diff options
author | Teddy Wing | 2018-03-07 21:04:01 +0100 |
---|---|---|
committer | Teddy Wing | 2018-03-07 21:04:01 +0100 |
commit | a48836ad6f4e8aae8b1dcd5b5c0d8a5935271abc (patch) | |
tree | f5b9ed26a7049f597e6b75f1693d80df7a4b3ed7 | |
parent | 26d6b13bc20582b09df7ee40c7d0f2c2580d19e2 (diff) | |
download | dotvim-a48836ad6f4e8aae8b1dcd5b5c0d8a5935271abc.tar.bz2 |
git-blamer: Use `cursor()` instead of `setpos()`
Use the `cursor()` function to set the position of the cursor. This call
is simpler than `setpos()`, and more descriptive than `execute
l:top_line` (that was inspired by fugitive.vim,
https://github.com/tpope/vim-fugitive/blob/f3ccb0c12ee4985b8808f83059830a24cc92821c/plugin/fugitive.vim#L2048-L2064)
-rw-r--r-- | bundle/git-blamer/autoload/git_blamer.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bundle/git-blamer/autoload/git_blamer.vim b/bundle/git-blamer/autoload/git_blamer.vim index 40ffddb..d12578b 100644 --- a/bundle/git-blamer/autoload/git_blamer.vim +++ b/bundle/git-blamer/autoload/git_blamer.vim @@ -25,9 +25,9 @@ function! git_blamer#Blame() setlocal nomodified nomodifiable " Move cursor to position in starting file - execute l:top_line + call cursor(l:top_line, 0) normal! zt - call setpos('.', [0, l:line_number, 0, 0]) + call cursor(l:line_number, 0) setlocal noswapfile nowrap nolist nobuflisted buftype=nofile bufhidden=wipe setlocal scrollbind cursorbind |