aboutsummaryrefslogtreecommitdiff
path: root/autoload/prettier/utils/buffer.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/prettier/utils/buffer.vim')
-rw-r--r--autoload/prettier/utils/buffer.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/prettier/utils/buffer.vim b/autoload/prettier/utils/buffer.vim
index 7bc7ab1..edd30dd 100644
--- a/autoload/prettier/utils/buffer.vim
+++ b/autoload/prettier/utils/buffer.vim
@@ -10,8 +10,8 @@ function! prettier#utils#buffer#replace(lines, startSelection, endSelection) abo
" https://vim.fandom.com/wiki/Restore_the_cursor_position_after_undoing_text_change_made_by_a_script
" create a fake change entry and merge with undo stack prior to do formating
- normal! ix
- normal! x
+ execute "normal! i "
+ execute "normal! a\<BS>"
try | silent undojoin | catch | endtry
" delete all lines on the current buffer