aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorOkan Karaman <okan@codeventure.com.tr>2020-10-16 16:44:54 +0300
committerOkan Karaman <okan@codeventure.com.tr>2020-10-16 16:44:54 +0300
commitaa3e9420796a73b3233c8754eb401b958b1b45e0 (patch)
treed4952b04068073a9ca95189f2d902aa2da6dc43e /autoload
parent7a6fddd0eb41f498ddc24aa6e34063dee7f04c2e (diff)
downloadvim-prettier-aa3e9420796a73b3233c8754eb401b958b1b45e0.tar.xz
fixes #244
Diffstat (limited to 'autoload')
-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