commit e1bd98fc7c721341ee3cf1fe7006684d9623db1b
parent 7ca9b07b6880c813cf6b93a0b205d77b54decc62
Author: Martin Grenfell <martin_grenfell@msn.com>
Date: Sun, 29 Jun 2008 01:00:55 +1200
open file bookmarks when user activates them
when the user activates a file bookmark open that file in the previous
window (i.e. do the 'o' mapping)
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2688,7 +2688,11 @@ function! s:ActivateNode()
else
let bookmark = s:GetSelectedBookmark()
if !empty(bookmark)
- call s:BookmarkToRoot(bookmark.name)
+ if bookmark.path.isDirectory
+ call s:BookmarkToRoot(bookmark.name)
+ else
+ call s:OpenFileNode(s:oTreeFileNode.New(bookmark.path))
+ endif
endif
endif
endfunction