From c864c6e463349a22e93e00ee48147321a61601f2 Mon Sep 17 00:00:00 2001 From: marty Date: Fri, 9 Oct 2009 18:41:00 +1300 Subject: [PATCH] bugfix for NERDTreeMirror when the user was prompted to choose a tree to mirror, it would mirror the wrong one --- doc/NERD_tree.txt | 1 + plugin/NERD_tree.vim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt index b4ea672..eab8bbc 100644 --- a/doc/NERD_tree.txt +++ b/doc/NERD_tree.txt @@ -1091,6 +1091,7 @@ The latest dev versions are on github Venteicher for the patch. - fix a bug where the cursor position/window size of the nerd tree buffer wasnt being stored on closing the window, thanks to Richard Hart. + - fix a bug where NERDTreeMirror would mirror the wrong tree 3.1.1 - fix a bug where a non-listed no-name buffer was getting created every diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 504c467..61edbe0 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2550,7 +2550,7 @@ function! s:initNerdTreeMirror() return endif - let bufferName = options[keys(options)[choice-1]] + let bufferName = options[sort(keys(options))[choice-1]] elseif len(keys(options)) ==# 1 let bufferName = values(options)[0] else