aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-01-25 16:25:11 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-01-25 16:25:11 -0500
commitfc1f891fb32b536317cc1e42c1c288755e27b25e (patch)
tree0ae74109d9396d50a6a57f0ae2d9db602ce4ab62 /core
parent7a2d26a6541038a4233412a572c3975e2ae59717 (diff)
Updated core/ext/pm/buffer_browser.lua to update the PM cursor appropriately.
Diffstat (limited to 'core')
-rw-r--r--core/ext/pm/buffer_browser.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/ext/pm/buffer_browser.lua b/core/ext/pm/buffer_browser.lua
index 83bb26f9..b2c04957 100644
--- a/core/ext/pm/buffer_browser.lua
+++ b/core/ext/pm/buffer_browser.lua
@@ -65,10 +65,21 @@ function perform_menu_action(menu_item, menu_id, selected_item)
end
local function update_view()
- if matches(textadept.pm.entry_text) then textadept.pm.activate() end
+ if matches(textadept.pm.entry_text) then
+ textadept.pm.activate()
+ for idx, buf in ipairs(textadept.buffers) do
+ if buf == buffer then
+ textadept.pm.cursor = idx - 1
+ break
+ end
+ end
+ end
end
textadept.events.add_handler('file_opened', update_view)
textadept.events.add_handler('buffer_new', update_view)
textadept.events.add_handler('buffer_deleted', update_view)
textadept.events.add_handler('save_point_reached', update_view)
textadept.events.add_handler('save_point_left', update_view)
+textadept.events.add_handler('buffer_switch', update_view)
+textadept.events.add_handler('view_switch', update_view)
+