aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-08 15:01:03 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-08 15:01:03 +1200
commit8d1485d4275393f15b245c9f97d5410f309d8cde (patch)
treea1d66ec22c2eeaaccfd0cbe48e5c5cd5c7a68f29
parent21a1149b3dcbb1d87ba9ffc44360960c5ea40981 (diff)
downloaddotfiles-8d1485d4275393f15b245c9f97d5410f309d8cde.tar.gz
dotfiles-8d1485d4275393f15b245c9f97d5410f309d8cde.zip
Don't jump if zero or no move
-rw-r--r--vim/after/ftplugin/mail.vim6
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