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
This commit is contained in:
parent
5d564fdbcf
commit
3e217115bc
@ -2308,7 +2308,7 @@ function! s:OpenFileNode(treenode)
|
|||||||
call s:PutCursorInTreeWin()
|
call s:PutCursorInTreeWin()
|
||||||
|
|
||||||
"if the file is already open in this tab then just stick the cursor in it
|
"if the file is already open in this tab then just stick the cursor in it
|
||||||
let winnr = bufwinnr(a:treenode.path.StrForOS(0))
|
let winnr = bufwinnr('^' . a:treenode.path.StrForOS(0) . '$')
|
||||||
if winnr != -1
|
if winnr != -1
|
||||||
exec winnr . "wincmd w"
|
exec winnr . "wincmd w"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user