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

vterm: Visual consistency for append #777

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

miguebox
Copy link
Contributor

@miguebox miguebox commented Feb 8, 2024

evil-collection-vterm-append doesn't work, and evil-collection-vterm-append-line doesn't correctly display where the cursor is located. This fixes both issues.

The problem with both commands lies in the fact that evil-append doesn't accurately place the insert-mode cursor in front of the cursor displayed in normal-mode; instead acting in a functionally identical way as evil-insert, but moving only the displayed cursor forward one character until a character is placed.

Moving the cursor forward one character before entering insert mode solves evil-collection-vterm-append's issues. I haven't encountered any unexpected behaviour with the edge-case scenario of moving the cursor forward at the end of a line, which is the only situation I thought might be problematic with this solution.

The only fault with evil-collection-vterm-append-line is where the cursor is displayed, not where it actually is at the time of editing, contrary to what happened with evil-collection-vterm-append. Therefore, all that is necessary is to move backwards one character the displayed cursor when entering insert-mode, which can be easily achieved by swapping evil-append for evil-insert.

Direct link to the package repository

https://github.com/miguebox/evil-collection/tree/pull-request

evil-collection-vterm-append doesn't work, and evil-collection-vterm-append-line
doesn't correctly display where the cursor is located. This fixes both
issues.
@condy0919 condy0919 merged commit 54e1eb0 into emacs-evil:master Feb 23, 2024
5 checks passed
@condy0919
Copy link
Collaborator

Very detailed explanation.

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