Skip to content

Commit

Permalink
Merge pull request #267 from okkan/master
Browse files Browse the repository at this point in the history
fixes #244
  • Loading branch information
mitermayer authored Nov 3, 2020
2 parents 7a6fddd + aa3e942 commit bc7ae99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/prettier/utils/buffer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc7ae99

Please sign in to comment.