From f98a3f9eabbb54987cf218fd8d1d7d45e624b191 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Wed, 24 Dec 2008 14:43:04 +1300 Subject: [PATCH] bugfix with :NERDTreeMirror --- plugin/NERD_tree.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index f96e4dd..978d53d 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -1831,10 +1831,13 @@ function! s:initNerdTreeMirror() "work out which tree to mirror, if there is more than 1 then ask the user let bufferName = '' if len(keys(options)) > 1 - let choice = inputlist(sort(keys(options))) + let choices = ["Choose a tree to mirror"] + let choices = extend(choices, sort(keys(options))) + let choice = inputlist(choices) if choice < 1 || choice > len(options) || choice == '' return endif + let bufferName = options[keys(options)[choice-1]] elseif len(keys(options)) == 1 let bufferName = values(options)[0]