Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Block Append puts cursor left of right most column if any rows are short. #4795

Closed
zolrath opened this issue May 4, 2020 · 3 comments
Assignees
Labels

Comments

@zolrath
Copy link

zolrath commented May 4, 2020

Describe the bug
When performing a Visual Block <C-v> mode selection with multiple rows/columns containing at least one line that is empty or ends before the right of the block selection, the cursor is placed one column to the left of the right most column when Appending <Shift-A>.

To Reproduce
Steps to reproduce the behavior:

  1. Enter a document
  2. Enter visual block mode <C-v>
  3. Select multiple rows and columns, ensuring at least one row contains fewer characters than the right most column of the selection.
  4. Press <Shift-A>
  5. The cursor will appear one column to the left of the selection.

Expected behavior
I would expect the multi-cursors to appear to the right of the visual block selection.

Screenshots
Block Selection Issue

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.14.1
  • VSCode version: 1.44.2
  • OS: Windows 10
@J-Fields
Copy link
Member

J-Fields commented May 4, 2020

Vanilla vim will add spaces to shorter lines, so that everything lines up. A broken attempt to do this causes this problem as well as #4796. That's the behavior I'll try to replicate, though it does have the unintended side effect of adding those spaces even if nothing is typed. That can be dealt with separately, however.

@J-Fields
Copy link
Member

J-Fields commented May 4, 2020

Actually, not sure that this is caused by the same problem, but whatever 🤷

J-Fields added a commit that referenced this issue May 4, 2020
- Adds spaces when line isn't long enough (fixes #4795)
- Don't delete text when selection is on whitespace (fixes #4796)
- Works with multiple cursors
@zolrath
Copy link
Author

zolrath commented May 4, 2020

Awesome, thanks for the quick turnaround on the two bugs! 🎉

berknam pushed a commit to berknam/Vim that referenced this issue May 5, 2020
- Adds spaces when line isn't long enough (fixes VSCodeVim#4795)
- Don't delete text when selection is on whitespace (fixes VSCodeVim#4796)
- Works with multiple cursors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants