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

vimode: Add special handling to include destination char for some commands #1104

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

techee
Copy link
Member

@techee techee commented Sep 1, 2021

For

abcde;

simple 't;' does the right thing and places the cursor on top of character
'e' just before ';'. However, for composed commands such as 'dt;', vim
also deletes the character 'e' which vimode currently doesn't.

Vim behaves in a bit inconsistent way regarding this behavior - while
for 'dw' (delete all until next word) it doesn't delete the first character
of the next word onto which the cursor is placed, for 'de' (delete until
next word end) it includes the final character of the deleted word. This
behavior makes sense from the use case point of view but makes handling
of such situations inconsistent.

This patch lists functions which behave this way and includes the
destination character to the selection.

Fixes #1052.

…mands

For

abcde;

simple 't;' does the right thing and places the cursor on top of character
'e' just before ';'. However, for composed commands such as 'dt;', vim
also deletes the character 'e' which vimode currently doesn't.

Vim behaves in a bit inconsistent way regarding this behavior - while
for 'dw' (delete all until next word) it doesn't delete the first character
of the next word onto which the cursor is placed, for 'de' (delete until
next word end) it includes the final character of the deleted word. This
behavior makes sense from the use case point of view but makes handling
of such situations inconsistent.

This patch lists functions which behave this way and includes the
destination character to the selection.

Fixes geany#1052.
@frlan frlan merged commit ef848d8 into geany:master Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dt not correct behaviour
2 participants