mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
Fix jump tracking when lines are added
This logic is pretty sloppy and apparently not well-tested. Not dealing with that now, just patching the obvious bug.
This commit is contained in:
parent
baa82a2d7b
commit
d447a27c24
@ -135,8 +135,7 @@ export async function activate(context: vscode.ExtensionContext, handleLocal: bo
|
||||
|
||||
const textWasAdded = (changeEvent: vscode.TextDocumentChangeEvent) =>
|
||||
changeEvent.contentChanges.length === 1 &&
|
||||
(changeEvent.contentChanges[0].text === '\n' ||
|
||||
changeEvent.contentChanges[0].text === '\r\n') &&
|
||||
changeEvent.contentChanges[0].text.includes('\n') &&
|
||||
changeEvent.contentChanges[0].range.start.line ===
|
||||
changeEvent.contentChanges[0].range.end.line;
|
||||
|
||||
@ -148,6 +147,8 @@ export async function activate(context: vscode.ExtensionContext, handleLocal: bo
|
||||
event.contentChanges[0].range,
|
||||
event.contentChanges[0].text
|
||||
);
|
||||
} else {
|
||||
// TODO: In this case, we should probably loop over the content changes...
|
||||
}
|
||||
|
||||
// Change from VSCode editor should set document.isDirty to true but they initially don't!
|
||||
|
Loading…
Reference in New Issue
Block a user