@@ -147,7 +147,7 @@ endif
147
147
let s:NERDTreeBufName = 'NERD_tree_'
148
148
149
149
let s:tree_wid = 2
150
- let s:tree_markup_reg = '^[ `|]*[\-+~] '
150
+ let s:tree_markup_reg = '^[ `|▼▶ ]*[\-+~ ]* '
151
151
let s:tree_up_dir_line = '.. (up a dir)'
152
152
153
153
"the number to add to the nerd tree buffer name to make the buf name unique
@@ -1313,34 +1313,20 @@ function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild)
1313
1313
"get all the leading spaces and vertical tree parts for this line
1314
1314
if a:depth > 1
1315
1315
for j in a:vertMap[0:-2]
1316
- if j ==# 1
1317
- let treeParts = treeParts . '| '
1318
- else
1319
- let treeParts = treeParts . ' '
1320
- endif
1316
+ let treeParts = treeParts . ' '
1321
1317
endfor
1322
1318
endif
1323
1319
1324
- "get the last vertical tree part for this line which will be different
1325
- "if this node is the last child of its parent
1326
- if a:isLastChild
1327
- let treeParts = treeParts . '`'
1328
- else
1329
- let treeParts = treeParts . '|'
1330
- endif
1331
-
1332
-
1333
- "smack the appropriate dir/file symbol on the line before the file/dir
1334
- "name itself
1335
1320
if self.path.isDirectory
1336
1321
if self.isOpen
1337
- let treeParts = treeParts . '~ '
1322
+ let treeParts = treeParts . '▼ '
1338
1323
else
1339
- let treeParts = treeParts . '+ '
1324
+ let treeParts = treeParts . '▶ '
1340
1325
endif
1341
1326
else
1342
- let treeParts = treeParts . '- '
1327
+ let treeParts = treeParts . ''
1343
1328
endif
1329
+
1344
1330
let line = treeParts . self.displayString()
1345
1331
1346
1332
let output = output . line . "\n"
@@ -3068,9 +3054,9 @@ function! s:getPath(ln)
3068
3054
endif
3069
3055
3070
3056
" in case called from outside the tree
3071
- if line !~ '^ *[|`]' || line =~ '^$'
3072
- return {}
3073
- endif
3057
+ " if line !~ '^ *[|`▶▼ ]' || line =~ '^$'
3058
+ " return {}
3059
+ " endif
3074
3060
3075
3061
if line ==# s:tree_up_dir_line
3076
3062
return b:NERDTreeRoot.path.getParent()
@@ -3628,24 +3614,8 @@ endfunction
3628
3614
function! s:checkForActivate()
3629
3615
let currentNode = s:TreeFileNode.GetSelected()
3630
3616
if currentNode != {}
3631
- let startToCur = strpart(getline(line(".")), 0, col("."))
3632
- let char = strpart(startToCur, strlen(startToCur)-1, 1)
3633
-
3634
- "if they clicked a dir, check if they clicked on the + or ~ sign
3635
- "beside it
3636
- if currentNode.path.isDirectory
3637
- if startToCur =~ s:tree_markup_reg . '$' && char =~ '[+~]'
3638
- call s:activateNode(0)
3639
- return
3640
- endif
3641
- endif
3642
-
3643
- if (g:NERDTreeMouseMode ==# 2 && currentNode.path.isDirectory) || g:NERDTreeMouseMode ==# 3
3644
- if char !~ s:tree_markup_reg && startToCur !~ '\/$'
3645
- call s:activateNode(0)
3646
- return
3647
- endif
3648
- endif
3617
+ call s:activateNode(0)
3618
+ return
3649
3619
endif
3650
3620
endfunction
3651
3621
0 commit comments