aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2017-07-09 00:10:33 +0200
committerTeddy Wing2017-07-09 00:10:33 +0200
commit90ee500ed7945cedcbdc45b40de3ab26a762479d (patch)
tree7de3b986a08bdaf3537832d0d458ff598cbf6ae7 /autoload
parent0e7df7ce3519e88a158e72f79c36305bc01e23d4 (diff)
downloadvim-grappele-90ee500ed7945cedcbdc45b40de3ab26a762479d.tar.bz2
autoload/grappele.vim: Don't save location when using `G` directly
Previously, we would save the location of the `G` command regardless of whether it was used with a count or not. Thus, `34G` and `G` would both save locations. Saving the location of `G` isn't really useful, but it's easily accessed. Instead, only save location when using a count with `G`. This allows the Grappele command to be useful even after having pressed `G`.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/grappele.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/grappele.vim b/autoload/grappele.vim
index c82d0c5..c699f0d 100644
--- a/autoload/grappele.vim
+++ b/autoload/grappele.vim
@@ -1,6 +1,5 @@
function! grappele#Grappele(line)
let l:current_buffer = 0
- let s:line = a:line
let l:column_position = 0
let l:column_offset = 0
@@ -10,6 +9,8 @@ function! grappele#Grappele(line)
" Go to the end of the buffer
$
else
+ let s:line = a:line
+
call setpos('.', [
\ l:current_buffer,
\ a:line,