aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/after/ftplugin/markdown/autoformat.vim6
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