Fixes behavior of 'x' in normal mode

After 'x' is used to delete a character at the end of a line the cursor
should be repositioned at the last character, i.e. repeatedly pressing
'x' in normal mode should delete the entire string.
This commit is contained in:
Michael Steinert
2016-11-30 14:28:43 -06:00
committed by Kurtis Rader
parent 1fbcb1ee9d
commit e2ed561264
3 changed files with 16 additions and 0 deletions

View File

@@ -2746,6 +2746,9 @@ const wchar_t *reader_readline(int nchars) {
if (el->position < el->size()) {
update_buff_pos(el, el->position + 1);
remove_backward();
if (el->position > 0 && el->position == el->size()) {
update_buff_pos(el, el->position - 1);
}
}
break;
}