From ae0d744357ab46a0292ccf258535bf0136c29256 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Thu, 16 Oct 2008 22:55:44 +1300 Subject: [PATCH] fix a backwards compatibility bug with maps Do an unlet when over riding a method on a prototype object. Some older versions of vim spaz out otherwise. Note: i was using these unlets up until a few versions ago when the were refactored out --- doc/NERD_tree.txt | 7 +++++++ plugin/NERD_tree.vim | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt index 4f5c458..b688652 100644 --- a/doc/NERD_tree.txt +++ b/doc/NERD_tree.txt @@ -901,6 +901,10 @@ fridge for later ;) ============================================================================== 7. Changelog *NERDTreeChangelog* +2.14.2 + - compatibility bugfix for older version of vim, thanks to knekk for + helping me track it down + 2.14.1 - dont clobber &cpo. Thanks to godlygeek for the bug report. @@ -1227,6 +1231,9 @@ handling named pipes. Chur to godlygeek for reporting a bug where &cpo was getting clobbered. +Cheers to knekk for helping me track down a bug when overwriting dictionary +keys that only occurred in some versions of vim. + ============================================================================== 9. License *NERDTreeLicense* diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 3a0a345..0732ef2 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -713,6 +713,7 @@ endfunction " "Args: "path: a path object +unlet s:TreeDirNode.findNode function! s:TreeDirNode.findNode(path) if a:path.equals(self.path) return self @@ -731,7 +732,6 @@ function! s:TreeDirNode.findNode(path) endif return {} endfunction - "FUNCTION: TreeDirNode.getChildCount() {{{3 "Returns the number of children this node has function! s:TreeDirNode.getChildCount() @@ -887,6 +887,7 @@ endfunction " "Args: "path: a path object representing the full filesystem path to the file/dir that the node represents +unlet s:TreeDirNode.New function! s:TreeDirNode.New(path) if a:path.isDirectory != 1 throw "NERDTree.TreeDirNode.InvalidArguments exception. A TreeDirNode object must be instantiated with a directory Path object." @@ -948,6 +949,7 @@ function! s:TreeDirNode._openRecursively2(forceOpen) endfunction "FUNCTION: TreeDirNode.refresh() {{{3 +unlet s:TreeDirNode.refresh function! s:TreeDirNode.refresh() call self.path.refresh()