autoload/lsp/textedit.vim | 3 ++- diff --git a/autoload/lsp/textedit.vim b/autoload/lsp/textedit.vim index 9a2b8c5f2c7bcefbf359ca8d5dea9a795e509d19..ee4cc4a62ab27c30ba4c1aaff24e7a936275770e 100644 --- a/autoload/lsp/textedit.vim +++ b/autoload/lsp/textedit.vim @@ -211,7 +211,7 @@ enddef # interface TextDocumentEdit def ApplyTextDocumentEdit(textDocEdit: dict) - var bnr: number = bufnr(util.LspUriToFile(textDocEdit.textDocument.uri)) + var bnr: number = util.LspUriToBufnr(textDocEdit.textDocument.uri) if bnr == -1 util.ErrMsg($'Text Document edit, buffer {textDocEdit.textDocument.uri} is not found') return @@ -269,6 +269,7 @@ # Rename file "renameFile.oldUri" to "renameFile.newUri" def FileRename(renameFile: dict) var old_fname: string = util.LspUriToFile(renameFile.oldUri) var new_fname: string = util.LspUriToFile(renameFile.newUri) + var opts: dict = renameFile->get('options', {}) var overwrite: bool = opts->get('overwrite', false) var ignoreIfExists: bool = opts->get('ignoreIfExists', true)