vimode: Add special handling to include destination char for some commands #1104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.