avoid unload new document on rename
This commit is contained in:
parent
8234e83f92
commit
4571c863ad
1 changed files with 4 additions and 4 deletions
|
@ -61,11 +61,11 @@ export default class UpdateImportsOnFileRenameHandler {
|
||||||
await workspace.nvim.command(`silent ${oldDocument.bufnr}bwipeout!`)
|
await workspace.nvim.command(`silent ${oldDocument.bufnr}bwipeout!`)
|
||||||
}
|
}
|
||||||
let document = workspace.getDocument(newUri)
|
let document = workspace.getDocument(newUri)
|
||||||
if (document) {
|
if (!document) {
|
||||||
await workspace.nvim.command(`silent ${document.bufnr}bwipeout!`)
|
document = await workspace.loadFile(newUri)
|
||||||
await wait(30)
|
} else {
|
||||||
|
workspace.nvim.command('checktime', true)
|
||||||
}
|
}
|
||||||
document = await workspace.loadFile(newUri)
|
|
||||||
if (!document) return
|
if (!document) return
|
||||||
await wait(50)
|
await wait(50)
|
||||||
const edits = await this.getEditsForFileRename(
|
const edits = await this.getEditsForFileRename(
|
||||||
|
|
Loading…
Reference in a new issue