Skip to content
Browse files

use normal! and center screen when restoring cursor position

  • Loading branch information...
1 parent dd097bf commit f5bd12f3d3d4d3aceb255920bd23a2d92e8ca808 @scrooloose committed Jun 8, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 vimrc
View
3 vimrc
@@ -191,7 +191,8 @@ autocmd BufReadPost * call SetCursorPosition()
function! SetCursorPosition()
if &filetype !~ 'commit\c'
if line("'\"") > 0 && line("'\"") <= line("$")
- exe "normal g`\""
+ exe "normal! g`\""
+ normal! zz
endif
end
endfunction

0 comments on commit f5bd12f

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