diff options
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r-- | vim/after/ftplugin/mail.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index cba446a3..fd67bc51 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -39,11 +39,18 @@ if line('.') == 1 && col('.') == 1 endif " Normalise quoting +let body = 0 for lnum in range(1, line('$')) " Get current line let line = getline(lnum) + " Skip lines until we hit a blank line, meaning body text + let body = body || !strlen(line) + if !body + continue + endif + " Get the leading quote string, if any; skip if there isn't one let quote = matchstr(line, '^>[> ]*') if strlen(quote) == 0 |