Open lfire opened 1 month ago
And vat
operation cannot select span tags
I think it's probably caused by the code here: L998
The meaning of this code is that if the starting position is chosen as the end of the line, it needs to be moved one character to the left
So we will select the '>' option in the start tag
I feel like there's no problem with the handling here, after all, Vim's cursor is on the character, so it can't appear at the end of the line, only on the last character
@J-Fields
Can we use the built-in functionality of VSCode for tag manipulation?
I will replace the code above with the code below
abstract class MoveTagMatch extends ExpandingSelection {
override modes = [Mode.Normal, Mode.Visual, Mode.VisualBlock];
protected includeTag = false;
override isJump = true;
public override async execAction(position: Position, vimState: VimState): Promise<IMovement> {
await vscode.commands.executeCommand('editor.emmet.action.balanceIn');
const selection = vimState.editor.selection;
return { start: selection.start, stop: selection.end };
}
}
The selection range here is correct, but after executing the code to correct the cursor position, the range is incorrect again
So is there any way we can avoid executing the subsequent correction code? I think we just need to execute it up to this point, and then we just need to execute v/c/d/y
PS: Including this bug #8872, I think the same solution can also be used
Describe the bug The selected character was error, when press vit in normal mode.As shown below:
The lower part of the figure shows how it looks in vim, which is correct.
To Reproduce Steps to reproduce the behavior:
get a vue file with code like:
move cursor into li tag
presse
vit
on normal modecommit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 date: 2024-07-09T22:07:54.982Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
Additional context Add any other context about the problem here.