From 99fe9596b3b8b4fcd653888132f757a9fb6a5e02 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 4 Jun 2018 21:48:59 +1200 Subject: Support counts and registers in paste wrapping --- vim/after/ftplugin/markdown/autoformat.vim | 6 +++--- 1 file 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 -- cgit v1.2.3