mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-11-10 00:59:44 +03:00
parent
2e4de2253a
commit
cb9a693104
@ -5335,13 +5335,13 @@ abstract class MoveInsideCharacter extends BaseMovement {
|
||||
} else {
|
||||
startPos = startPlusOne;
|
||||
if (vimState.currentMode === ModeName.Visual) {
|
||||
endPos = endPos.getLeft();
|
||||
endPos = endPos.getLeftThroughLineBreaks();
|
||||
}
|
||||
}
|
||||
|
||||
// If the closing character is the first on the line, don't swallow it.
|
||||
if (!this.includeSurrounding) {
|
||||
if (endPos.character === 0) {
|
||||
if (endPos.character === 0 && vimState.currentMode !== ModeName.Visual) {
|
||||
endPos = endPos.getLeftThroughLineBreaks();
|
||||
} else if (/^\s+$/.test(TextEditor.getText(new vscode.Range(endPos.getLineBegin(), endPos.getLeft())))) {
|
||||
endPos = endPos.getPreviousLineBegin().getLineEnd();
|
||||
|
@ -574,6 +574,14 @@ suite("Mode Visual", () => {
|
||||
endMode: ModeName.Normal
|
||||
});
|
||||
|
||||
newTest({
|
||||
title: "Can do vi( on a matching bracket near first character",
|
||||
start: ["test(()=>{", "|", "});"],
|
||||
keysPressed: "vi(d",
|
||||
end: ["test(|);"],
|
||||
endMode: ModeName.Normal
|
||||
});
|
||||
|
||||
suite("handles replace in visual mode", () => {
|
||||
newTest({
|
||||
title: "Can do a single line replace",
|
||||
|
Loading…
Reference in New Issue
Block a user