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
|
|
@ -1401,6 +1401,12 @@ scrollback search mode. The syntax is exactly the same as the regular
|
||||||
Deletes the **word after** the cursor. Default: _Mod1+d
|
Deletes the **word after** the cursor. Default: _Mod1+d
|
||||||
Control+Delete_.
|
Control+Delete_.
|
||||||
|
|
||||||
|
*delete-to-start*
|
||||||
|
Deletes search input before the cursor. Default: _Ctrl+u_.
|
||||||
|
|
||||||
|
*delete-to-end*
|
||||||
|
Deletes search input after the cursor. Default: _Ctrl+k_.
|
||||||
|
|
||||||
*extend-char*
|
*extend-char*
|
||||||
Extend current selection to the right, by one character. Default:
|
Extend current selection to the right, by one character. Default:
|
||||||
_Shift+Right_.
|
_Shift+Right_.
|
||||||
|
|
|
||||||
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: {
|
case BIND_ACTION_SEARCH_DELETE_TO_END: {
|
||||||
if (term->search.cursor < term->search.len) {
|
if (term->search.cursor < term->search.len) {
|
||||||
memmove(&term->search.buf[term->search.cursor],
|
term->search.buf[term->search.cursor] = '\0';
|
||||||
&term->search.buf[term->search.len],
|
|
||||||
(term->search.len + term->search.cursor - term->search.len)
|
|
||||||
* sizeof(char32_t));
|
|
||||||
|
|
||||||
term->search.len = term->search.cursor;
|
term->search.len = term->search.cursor;
|
||||||
*update_search_result = *redraw = true;
|
*update_search_result = *redraw = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue