public
Description: hax0r vim script to give you a tree explorer
Clone URL: git://github.com/scrooloose/nerdtree.git
fix a bug with improper use of bufwinnr function

add a '^' and '$' to the end of the file matching pattern so it cant get
confused by buffer names that happen to be a substring of buffer we are
comparing against
scrooloose (author)
Tue Jul 15 23:34:46 -0700 2008
commit  e321ac36221f0a78b0d4bf59bfc838f3496fe117
tree    5b528bfa0944dbdf316a0197b5f83e234b19f001
parent  2468fd82d5ebf17d5ae00ddc0cf96c60dc394863
...
2308
2309
2310
2311
 
2312
2313
2314
...
2308
2309
2310
 
2311
2312
2313
2314
0
@@ -2308,7 +2308,7 @@ function! s:OpenFileNode(treenode)
0
     call s:PutCursorInTreeWin()
0
 
0
     "if the file is already open in this tab then just stick the cursor in it
0
- let winnr = bufwinnr(a:treenode.path.StrForOS(0) . '$')
0
+ let winnr = bufwinnr('^' . a:treenode.path.StrForOS(0) . '$')
0
     if winnr != -1
0
         exec winnr . "wincmd w"
0
 

Comments

    No one has commented yet.