mirror of
https://github.com/preservim/nerdtree.git
synced 2024-10-18 22:00:21 +03:00
bugfix with :NERDTreeMirror
This commit is contained in:
parent
c9c67b5b67
commit
f98a3f9eab
@ -1831,10 +1831,13 @@ function! s:initNerdTreeMirror()
|
|||||||
"work out which tree to mirror, if there is more than 1 then ask the user
|
"work out which tree to mirror, if there is more than 1 then ask the user
|
||||||
let bufferName = ''
|
let bufferName = ''
|
||||||
if len(keys(options)) > 1
|
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 == ''
|
if choice < 1 || choice > len(options) || choice == ''
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let bufferName = options[keys(options)[choice-1]]
|
let bufferName = options[keys(options)[choice-1]]
|
||||||
elseif len(keys(options)) == 1
|
elseif len(keys(options)) == 1
|
||||||
let bufferName = values(options)[0]
|
let bufferName = values(options)[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user