diff options
author | 2010-03-10 02:55:33 -0500 | |
---|---|---|
committer | 2010-03-10 02:55:33 -0500 | |
commit | 69aa7111af192403ee612be1aaa87555beabe145 (patch) | |
tree | 9501f45bc24d535084da5dddce2087073b90edae /core/ext/pm.lua | |
parent | 9ccdc7a172c6a60ce948e4c5093603f02b530750 (diff) | |
download | textadept-69aa7111af192403ee612be1aaa87555beabe145.tar.gz textadept-69aa7111af192403ee612be1aaa87555beabe145.zip |
Removed side pane.
Diffstat (limited to 'core/ext/pm.lua')
-rw-r--r-- | core/ext/pm.lua | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/core/ext/pm.lua b/core/ext/pm.lua deleted file mode 100644 index cec2fd5b..00000000 --- a/core/ext/pm.lua +++ /dev/null @@ -1,60 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE. - -local pm = textadept.pm - -local current_browser = nil - --- For restoring browser cursors -local last_browser_text = nil -local browser_cursors = {} - -textadept.events.add_handler('pm_contents_request', - function(full_path, expanding) - for _, browser in pairs(pm.browsers) do - if browser.matches(full_path[1]) then - current_browser = browser - if last_browser_text and last_browser_text ~= pm.entry_text then - -- Switching browsers, save the current one's cursor. - -- Don't reset last_browser_text here though, we still need to detect - -- the switch when the 'pm_view_filled' event is called so as to restore - -- the cursor to the new browser. - browser_cursors[last_browser_text] = pm.cursor - end - pm.fill(browser.get_contents_for(full_path, expanding), expanding) - textadept.events.handle('pm_view_filled') - end - end - end) - -textadept.events.add_handler('pm_item_selected', - function(selected_item) current_browser.perform_action(selected_item) end) - -textadept.events.add_handler('pm_context_menu_request', - function(selected_item, event) - local menu = current_browser.get_context_menu(selected_item) - if menu then pm.show_context_menu(menu, event) end - end) - -textadept.events.add_handler('pm_menu_clicked', - function(menu_id, selected_item) - current_browser.perform_menu_action(menu_id, selected_item) - end) - --- LuaDoc is in core/.browser.lua. -function pm.toggle_visible() - if pm.width > 0 then - pm.prev_width = pm.width - pm.width = 0 - else - pm.width = pm.prev_width or 150 - end -end - -textadept.events.add_handler('pm_view_filled', - function() -- try to restore previous browser cursor - if last_browser_text ~= pm.entry_text then - last_browser_text = pm.entry_text - local previous_cursor = browser_cursors[pm.entry_text] - if previous_cursor then pm.cursor = previous_cursor end - end - end) |