Skip to content
Browse files

FIX: Wrong order; buffer delete must come after edit.

Commit 1d89cc7 messed up the implementation from e43d6f3. When the original buffer is deleted before the effective buffer is edited, the current window may close, thereby making a :split command appear like an :edit.
  • Loading branch information...
1 parent cfc14a4 commit d9ce22bca5e2d7654ab17a5a0c4981374614d007 @inkarkat inkarkat committed Jul 3, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 plugin/file_line.vim
View
5 plugin/file_line.vim
@@ -28,17 +28,16 @@ function! s:gotoline()
if filereadable(file_name)
let l:bufn = bufnr("%")
- exec ":bwipeout " l:bufn
exec "keepalt edit " . file_name
exec ":" . line_num
exec "normal! " . col_num . '|'
if foldlevel(line_num) > 0
exec "normal! zv"
endif
-
-
exec "normal! zz"
+
+ exec ":bwipeout " l:bufn
endif
endfunction

0 comments on commit d9ce22b

Please sign in to comment.
Something went wrong with that request. Please try again.