aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-23 11:54:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-23 11:54:30 +1300
commitb28916fcf57b63c233b68e500a0596b6dc704299 (patch)
tree95b68ea24498d0f24784a2d1eefcb6f72ba952b3
parentAdd an issue about mail filetypes in Vim (diff)
downloaddotfiles-b28916fcf57b63c233b68e500a0596b6dc704299.tar.gz
dotfiles-b28916fcf57b63c233b68e500a0596b6dc704299.zip
Correct RHS of (un)important mail ftplugin map
This resolves the issue raised in f1b6f3b, where the mappings did not work if the cursor was on the first line. I had the colon `:` that starts the `ex` command and the `<C-U>` that clears any existing command around the wrong way. Because CTRL-U in normal mode scrolls up, it fails if we're already on the top line, and the rest of the mapping looks to be skipped. There don't seem to be any other instances of the same error that I can find.
-rw-r--r--ISSUES.md2
-rw-r--r--vim/after/ftplugin/mail.vim4
2 files changed, 2 insertions, 4 deletions
diff --git a/ISSUES.md b/ISSUES.md
index f5ca69a8..3ead2d0d 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -26,5 +26,3 @@ Known issues
depends on which shell you're using; the `sd` function isn't available when
you're not using Bash. Maybe I should try to extend `help` without breaking
it?
-* The low-priority shortcut for mail messages in Vim doesn't work if you're on
- the first line.
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 609cd92f..688ca6eb 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -43,10 +43,10 @@ endif
" Flag messages as important/unimportant
nnoremap <buffer> <LocalLeader>h
- \ <C-U>:call mail#FlagImportant()<CR>
+ \ :<C-U>call mail#FlagImportant()<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>h'
nnoremap <buffer> <LocalLeader>l
- \ <C-U>:call mail#FlagUnimportant()<CR>
+ \ :<C-U>call mail#FlagUnimportant()<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>l'
" Quote operator