Skip to content

Commit 89c30c0

Browse files
committed
Revert "Use win{save,rest}view instead of {getcur,set}pos"
This reverts commit 6871eb1.
1 parent 6871eb1 commit 89c30c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

autoload/jsx_pretty/comment.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function! jsx_pretty#comment#update_commentstring(original)
22
let syn_current = s:syn_name(line('.'), col('.'))
33
let syn_start = s:syn_name(line('.'), 1)
4-
let save_view = winsaveview()
4+
let save_cursor = getcurpos()
55

66
if syn_start =~? '^jsx'
77
let line = getline(".")
@@ -22,7 +22,7 @@ function! jsx_pretty#comment#update_commentstring(original)
2222
endif
2323

2424
" Restore the cursor position
25-
call winrestview(save_view)
25+
call setpos('.', save_cursor)
2626
endfunction
2727

2828
function! s:syn_name(lnum, cnum)

0 commit comments

Comments
 (0)