diff options
author | Camil Staps | 2021-06-18 14:03:32 +0200 |
---|---|---|
committer | Camil Staps | 2021-06-18 14:03:32 +0200 |
commit | 26e83c78c3430e53b8bad0066c0dce48f9f232be (patch) | |
tree | 2dfc1ffe19bdc8c9a5ed9bbdee1891fb8f02611d | |
parent | Discard old autocmds when reloading .vimrc (diff) |
Fix vim SwitchToFileOrOpen; take current directory into account
-rw-r--r-- | vim/.vimrc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -183,7 +183,8 @@ augroup END " Switch to a window that has a buffer open, or open a new window if no window " exists for that filename. function! s:switch_to_file_or_open(filename, in_tab) - let id=bufwinid('^' . a:filename . '$') + let fname = filenamemodify(a:filename, ':~:.') + let id = bufwinid('^' . a:filename . '$') if id < 0 if a:in_tab tabnew |