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

[vi-mode] Undoing a delete moves the cursor at the end of the newly pasted text. #1673

Closed
springcomp opened this issue Jul 18, 2020 · 1 comment · Fixed by #2045
Closed
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fixed VI-Mode

Comments

@springcomp
Copy link
Contributor

Environments

PS version: 5.1.19041.1
PSReadline version: 2.0.0-beta2
os: 10.0.19041.322 (WinBuild.160101.0800)
PS file version: 10.0.19041.322 (WinBuild.160101.0800)
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 120
BufferHeight: 30

PS version: 7.1.0-preview.2
PSReadline version: 2.0.1
os: 10.0.19041.322 (WinBuild.160101.0800)
PS file version: 7.1.0.0
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 120
BufferHeight: 30

Steps to reproduce

  • Type the following sequence: oneEsc0
    Thus, typing one and positioning the cursor at the beginning of the line.

  • Then, type x to delete one character.

  • Finally, type uto undo.

Expected behavior

The cursor should stay at the beginning of the line. In fact, the cursor should stay at the start position of the deleted text.

Actual behavior

Notice that the cursor is now on the n letter, instead of the o letter, at the beginning of the line.

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jul 18, 2020
@daxian-dbw daxian-dbw added Issue-Bug It either shouldn't be doing this or needs an investigation. VI-Mode and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Jul 22, 2020
springcomp added a commit to springcomp/PSReadLine that referenced this issue Dec 2, 2020
springcomp added a commit to springcomp/PSReadLine that referenced this issue Dec 16, 2020
daxian-dbw pushed a commit to daxian-dbw/PSReadLine that referenced this issue Sep 21, 2021
@ghost ghost added the Resolution-Fixed label Sep 22, 2021
@daxian-dbw daxian-dbw added this to the 2.2.0-Consider milestone Sep 22, 2021
@ghost
Copy link

ghost commented Oct 28, 2021

🎉 This issue was addressed in 2045, which has now been successfully released in v2.2.0-beta4. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fixed VI-Mode
Projects
None yet
2 participants