rx
rx copied to clipboard
Handle delete key in cmdline
If there is a character after the cursor delete that, otherwise delete the current character.
If the deletion should only delete the character after the cursor these change must be made:
fn cmdline_handle_delete(&mut self) {
if self.cmdline.cursor_forward().is_some() {
self.cmdline.delc();
}
if self.cmdline.is_empty() {
self.cmdline_hide();
}
}