mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
fix: cursor position after item move command
closes Item movers need some fixes #8492
This commit is contained in:
parent
05fc97e31b
commit
3dce8a3924
@ -52,7 +52,7 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs
|
|||||||
} else {
|
} else {
|
||||||
builder.replace(indel.range, indel.newText);
|
builder.replace(indel.range, indel.newText);
|
||||||
}
|
}
|
||||||
lineDelta = countLines(indel.newText) - (indel.range.end.line - indel.range.start.line);
|
lineDelta += countLines(indel.newText) - (indel.range.end.line - indel.range.start.line);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (selections.length > 0) editor.selections = selections;
|
if (selections.length > 0) editor.selections = selections;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user