Skip to content

Commit

Permalink
Update vital modules
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Jan 5, 2021
1 parent 9c99f91 commit 59469e5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions autoload/vital/_lsp/VS/LSP/TextEdit.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ function! s:get_method() abort
if s:_method ==# 'auto'
if exists('*nvim_buf_set_text')
return 'nvim_buf_set_text'
elseif !has('nvim')
return 'normal'
else
return 'function'
return 'normal'
endif
endif
return s:_method
Expand Down Expand Up @@ -153,7 +151,7 @@ function! s:_methods.normal(bufnr, text_edits, cursor_position) abort
else
let l:command = printf('%sG%s|', l:start[0], l:start[1])
endif
call setreg('x', l:text_edit.newText, 'c')
call setreg('x', s:Text.normalize_eol(l:text_edit.newText), 'c')
execute printf('noautocmd keepjumps normal! %s"xP', l:command)

let l:fix_cursor = s:_fix_cursor(a:cursor_position, l:text_edit, s:Text.split_by_eol(l:text_edit.newText)) || l:fix_cursor
Expand Down

0 comments on commit 59469e5

Please sign in to comment.