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

Fix cursor position after executing J in visual mode #4702

Merged

Conversation

lusingander
Copy link
Contributor

What this PR does / why we need it:
The cursor position after executing J command in visual (line / block) mode is different from expected.

e.g.

In the following state, for example,

o|ne
two
three
four
five

now, if execute vjjjJ, we will get the following state in the original Vim.

one two three| four
five

(The cursor should be in the space in front of the last word.)

but now, it's like this:

one| two three four
five

the same is true for visual line mode and visual block mode.

Which issue(s) this PR fixes

Special notes for your reviewer:
Same fix is not made for gJ because [count]gJ doesn't work properly... (#2207)

Copy link
Member

@J-Fields J-Fields left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@J-Fields J-Fields merged commit c915239 into VSCodeVim:master Apr 26, 2020
@lusingander lusingander deleted the fix/visual-join-cursor-position branch April 26, 2020 21:29
berknam pushed a commit to berknam/Vim that referenced this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants