Skip to content

Commit 59469e5

Browse files
committed
Update vital modules
1 parent 9c99f91 commit 59469e5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

autoload/vital/_lsp/VS/LSP/TextEdit.vim

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ function! s:get_method() abort
5555
if s:_method ==# 'auto'
5656
if exists('*nvim_buf_set_text')
5757
return 'nvim_buf_set_text'
58-
elseif !has('nvim')
59-
return 'normal'
6058
else
61-
return 'function'
59+
return 'normal'
6260
endif
6361
endif
6462
return s:_method
@@ -153,7 +151,7 @@ function! s:_methods.normal(bufnr, text_edits, cursor_position) abort
153151
else
154152
let l:command = printf('%sG%s|', l:start[0], l:start[1])
155153
endif
156-
call setreg('x', l:text_edit.newText, 'c')
154+
call setreg('x', s:Text.normalize_eol(l:text_edit.newText), 'c')
157155
execute printf('noautocmd keepjumps normal! %s"xP', l:command)
158156

159157
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

0 commit comments

Comments
 (0)