aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/git-blamer/autoload
diff options
context:
space:
mode:
authorTeddy Wing2018-03-07 21:04:01 +0100
committerTeddy Wing2018-03-07 21:04:01 +0100
commita48836ad6f4e8aae8b1dcd5b5c0d8a5935271abc (patch)
treef5b9ed26a7049f597e6b75f1693d80df7a4b3ed7 /bundle/git-blamer/autoload
parent26d6b13bc20582b09df7ee40c7d0f2c2580d19e2 (diff)
downloaddotvim-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)
Diffstat (limited to 'bundle/git-blamer/autoload')
-rw-r--r--bundle/git-blamer/autoload/git_blamer.vim4
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