diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-04 21:48:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-04 21:48:59 +1200 |
commit | 99fe9596b3b8b4fcd653888132f757a9fb6a5e02 (patch) | |
tree | 98f737f2bc82d9976874bd13508757e826a57a72 /vim/after | |
parent | Rearrange/correct markdown_autoformat.vim (diff) | |
download | dotfiles-99fe9596b3b8b4fcd653888132f757a9fb6a5e02.tar.gz dotfiles-99fe9596b3b8b4fcd653888132f757a9fb6a5e02.zip |
Support counts and registers in paste wrapping
Diffstat (limited to 'vim/after')
-rw-r--r-- | vim/after/ftplugin/markdown/autoformat.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vim/after/ftplugin/markdown/autoformat.vim b/vim/after/ftplugin/markdown/autoformat.vim index 78a2c23a..3f620691 100644 --- a/vim/after/ftplugin/markdown/autoformat.vim +++ b/vim/after/ftplugin/markdown/autoformat.vim @@ -65,14 +65,14 @@ augroup END if !has('*s:Put') function! s:Put(above) abort let l:suspended = 0 - if &formatoptions =~# '\ma' && @" =~# '\m\n' + if &formatoptions =~# '\ma' && getreg() =~# '\m\n' setlocal formatoptions-=a let l:suspended = 1 endif if a:above - normal! P + execute 'normal! "'.v:register.v:count1.'P' else - normal! p + execute 'normal! "'.v:register.v:count1.'p' endif if l:suspended setlocal formatoptions+=a |