summaryrefslogtreecommitdiffstats
path: root/autoload/jsx_pretty
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-09-27 19:47:32 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-09-27 19:47:32 +0200
commitf95026252c5a31242903a98c741887696dfbb11f (patch)
treecd697cdc96c20a44f03ff3aacc67f78fdcc6ece5 /autoload/jsx_pretty
parent4f3df59be709bf0d5c5c67dc804fde49abdc2700 (diff)
downloadvim-polyglot-f95026252c5a31242903a98c741887696dfbb11f.tar.gz
vim-polyglot-f95026252c5a31242903a98c741887696dfbb11f.zip
Update everything, closes #435
Diffstat (limited to 'autoload/jsx_pretty')
-rw-r--r--autoload/jsx_pretty/comment.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/jsx_pretty/comment.vim b/autoload/jsx_pretty/comment.vim
index 1569cd82..c202ebf4 100644
--- a/autoload/jsx_pretty/comment.vim
+++ b/autoload/jsx_pretty/comment.vim
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript')
function! jsx_pretty#comment#update_commentstring(original)
let syn_current = s:syn_name(line('.'), col('.'))
let syn_start = s:syn_name(line('.'), 1)
- let save_view = winsaveview()
+ let save_cursor = getcurpos()
if syn_start =~? '^jsx'
let line = getline(".")
@@ -24,7 +24,7 @@ function! jsx_pretty#comment#update_commentstring(original)
endif
" Restore the cursor position
- call winrestview(save_view)
+ call setpos('.', save_cursor)
endfunction
function! s:syn_name(lnum, cnum)