mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-18 06:46:23 -04:00
fix: replace unnecessary memmove, add more documentation for new keybinding.
Ref: #1972, #1983
This commit is contained in:
parent
ff058c5611
commit
86037f7d83
2 changed files with 7 additions and 5 deletions
6
search.c
6
search.c
|
|
@ -1281,11 +1281,7 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
|
||||
case BIND_ACTION_SEARCH_DELETE_TO_END: {
|
||||
if (term->search.cursor < term->search.len) {
|
||||
memmove(&term->search.buf[term->search.cursor],
|
||||
&term->search.buf[term->search.len],
|
||||
(term->search.len + term->search.cursor - term->search.len)
|
||||
* sizeof(char32_t));
|
||||
|
||||
term->search.buf[term->search.cursor] = '\0';
|
||||
term->search.len = term->search.cursor;
|
||||
*update_search_result = *redraw = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue