Skip to content

fix: clamp cursor on insert escape#76

Merged
leohenon merged 1 commit intoleohenon:ocvfrom
reobin:fix/insert-escape-cursor-clamp
Apr 27, 2026
Merged

fix: clamp cursor on insert escape#76
leohenon merged 1 commit intoleohenon:ocvfrom
reobin:fix/insert-escape-cursor-clamp

Conversation

@reobin
Copy link
Copy Markdown

@reobin reobin commented Apr 26, 2026

  • found this while working on a new motion
  • avoid leaving cursor on newline after exiting insert
  • matches vim behavior so paste lands on the right line

repo steps before this fix:

  1. fill input box with abc/nde (\n being a line break)
  2. cursor on position 0,0 ("a")
  3. do x to remove it
  4. do A to go to insert mode at end of line
  5. do esc to go back to normal mode
  6. do p to paste the "a"
  7. it will be pasted on second line, instead of end of first line

* avoid leaving cursor on newline after exiting insert
* matches vim behavior so paste lands on the right line
Copy link
Copy Markdown
Owner

@leohenon leohenon left a comment

Choose a reason for hiding this comment

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

Thanks!

@leohenon leohenon merged commit b2603eb into leohenon:ocv Apr 27, 2026
1 check passed
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.

2 participants