File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ endif
149
149
let s: NERDTreeBufName = ' NERD_tree_'
150
150
151
151
let s: tree_wid = 2
152
- let s: tree_markup_reg = ' ^[ `|]*[\-+~▾▸ ]* '
152
+ let s: tree_markup_reg = ' ^[ `|]*[\-+~▾▸ ]\+ '
153
153
let s: tree_up_dir_line = ' .. (up a dir)'
154
154
155
155
" the number to add to the nerd tree buffer name to make the buf name unique
@@ -3672,19 +3672,17 @@ function! s:checkForActivate()
3672
3672
let currentNode = s: TreeFileNode .GetSelected ()
3673
3673
if currentNode != {}
3674
3674
let startToCur = strpart (getline (line (" ." )), 0 , col (" ." ))
3675
- let char = strpart (startToCur, strlen (startToCur)-1 , 1 )
3676
3675
3677
- " if they clicked a dir, check if they clicked on the + or ~ sign
3678
- " beside it
3679
3676
if currentNode.path .isDirectory
3680
- if startToCur = ~# s: tree_markup_reg . ' $' && char = ~# ' [+~] '
3677
+ if startToCur = ~# s: tree_markup_reg . ' $' && startToCur = ~# ' [+~▾▸]$ '
3681
3678
call s: activateNode (0 )
3682
3679
return
3683
3680
endif
3684
3681
endif
3685
3682
3686
3683
if (g: NERDTreeMouseMode == # 2 && currentNode.path .isDirectory) || g: NERDTreeMouseMode == # 3
3687
- if char !~# s: tree_markup_reg && startToCur !~# ' \/$'
3684
+ let char = strpart (startToCur, strlen (startToCur)-1 , 1 )
3685
+ if char !~# s: tree_markup_reg
3688
3686
call s: activateNode (0 )
3689
3687
return
3690
3688
endif
You can’t perform that action at this time.
0 commit comments