mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
libedit: Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key. Behaviour in vi mode is unchanged (for 'x').
This commit is contained in:
parent
fe5d61a4cf
commit
96e75396e1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212191
@ -163,15 +163,12 @@ ed_delete_next_char(EditLine *el, int c)
|
||||
return (CC_ERROR);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if (el->el_line.cursor != el->el_line.buffer)
|
||||
el->el_line.cursor--;
|
||||
else
|
||||
return (CC_ERROR);
|
||||
}
|
||||
} else
|
||||
return (CC_ERROR);
|
||||
}
|
||||
c_delafter(el, el->el_state.argument); /* delete after dot */
|
||||
if (el->el_line.cursor >= el->el_line.lastchar &&
|
||||
if (el->el_map.type == MAP_VI &&
|
||||
el->el_line.cursor >= el->el_line.lastchar &&
|
||||
el->el_line.cursor > el->el_line.buffer)
|
||||
/* bounds check */
|
||||
el->el_line.cursor = el->el_line.lastchar - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user