diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-08 15:01:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-08 15:01:03 +1200 |
commit | 8d1485d4275393f15b245c9f97d5410f309d8cde (patch) | |
tree | a1d66ec22c2eeaaccfd0cbe48e5c5cd5c7a68f29 /vim/after/ftplugin | |
parent | Merge branch 'release/v1.49.0' (diff) | |
download | dotfiles-8d1485d4275393f15b245c9f97d5410f309d8cde.tar.gz dotfiles-8d1485d4275393f15b245c9f97d5410f309d8cde.zip |
Don't jump if zero or no move
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r-- | vim/after/ftplugin/mail.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 657c98ca..1ad4294b 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -99,8 +99,10 @@ function! s:NewBlank(start, count, up) abort let l:num += a:up ? -1 : 1 endwhile - " Move to line (needs jumps and marks setting) - execute 'normal '.l:num.'G' + " Move to line if nonzero and not equal to the current line + if l:num && l:num != line('.') + execute 'normal '.l:num.'G' + endif endfunction |