aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/.vimrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index e35f9cb..ff39615 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -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