visual block mode select error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
After I enter visual block mode with Ctrl-V, I try to use Shift+I to insert something, but it seems to get the wrong row.
To Reproduce
I have such context:
#define atomic64_inc_and_test(v) [my cursor](atomic64_inc_return(v) == 0)
#define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0)
#define atomic64_sub_and_test(i, v) (atomic64_sub_return((i), (v)) == 0)
#define atomic64_add_negative(i, v) (atomic64_add_return((i), (v)) < 0)
#define atomic64_add_unless(v, a, u) (___atomic_add_unless(v, a, u, 64) != u)
Ctrl+V and Shift+I and j to go down
I would like to insert before
[my cursor](atomic64_inc_return(v) == 0)
(atomic64_dec_return(v) == 0)
(atomic64_sub_return((i), (v)) == 0)
(atomic64_add_return((i), (v)) < 0)
(___atomic_add_unless(v, a, u, 64) != u)
but I got
[my cursor](atomic64_inc_return(v) == 0)
(atomic64_dec_return(v) == 0)
) (atomic64_sub_return((i), (v)) == 0)
) (atomic64_add_return((i), (v)) < 0)
u) (___atomic_add_unless(v, a, u, 64) != u)
Expected behavior
I don't know whether it is a bug or my operation is wrong. Thanks a lot.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code using the shown five-line context and the Ctrl-V, Shift-I, then j sequence. Compare the visual block selection and insertion behavior with the expected output; the work is done when insertion occurs before every selected row without moving or truncating text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100