Add `delete-line` binding
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by bbb651 · committed by Mark Stosberg · parent 1e50fff · Browse files · 6 files·+20 added−1 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+20 added−1 removed
- other:+20 added−1 removed
Provenance
- Commit
3e7c9a2- Tree
e9a6573- Author
bbb651 <bar.ye651@gmail.com>- Committer
Mark Stosberg <mark@stosberg.com>- Parent
1e50fff
6 files changed+20 added−1 removed
modified:doc/fuzzel.ini.5.scd+6 added
557 unmodified lines558 *delete-next-word*559 Deletes the **word after** the cursor. Default: _Mod1+d560 Control+Delete_.561 562+*delete-line-forward*563+ Deletes everything after the cursor. Default: _Control+k_.564+565+*delete-line*566+ Deletes the entire input. Default: _Control+Shift+BackSpace_.567+568 *insert-selected*569 Copies the selected entry to the prompt, replacing the current570 prompt. In application mode, the *Exec* line is inserted, and in571 dmenu mode the entry itself is used. Default: _Control+Tab_.110 unmodified linesmodified:CHANGELOG.md+3 added-1 removed
113 unmodified lines114 * `--with-nth=N` command line option ([#438][438]).115 * `--accept-nth=N` command line option ([#493][493]).116 * `keyboard-focus=exclusive|on-demand` command line and config option117 ([#495][495]).118+* New key binding: `delete-line` corresponding to C-S-Backspace in Emacs,119+ Which deletes the entire input ([#472][472]).120 121 [447]: https://codeberg.org/dnkl/fuzzel/issues/447122 [438]: https://codeberg.org/dnkl/fuzzel/issues/438123 [493]: https://codeberg.org/dnkl/fuzzel/pulls/493124 [495]: https://codeberg.org/dnkl/fuzzel/pulls/495125+[472]: https://codeberg.org/dnkl/fuzzel/pulls/472126 124-127 ### Changed128 129 * Take the matched sub-string's position into account when sorting130 matches; entries where the matched sub-string is closer to the887 unmodified linesmodified:config.c+3 added
43 unmodified lines44 [BIND_ACTION_CURSOR_LEFT] = "cursor-left",45 [BIND_ACTION_CURSOR_LEFT_WORD] = "cursor-left-word",46 [BIND_ACTION_CURSOR_RIGHT] = "cursor-right",47 [BIND_ACTION_CURSOR_RIGHT_WORD] = "cursor-right-word",48+ [BIND_ACTION_DELETE_LINE] = "delete-line",49 [BIND_ACTION_DELETE_PREV] = "delete-prev",50 [BIND_ACTION_DELETE_PREV_WORD] = "delete-prev-word",51 [BIND_ACTION_DELETE_LINE_BACKWARD] = "delete-line-backward",52 [BIND_ACTION_DELETE_NEXT] = "delete-next",1471 unmodified lines1524 1525 {BIND_ACTION_CURSOR_RIGHT_WORD, m_alt, {{XKB_KEY_f}}},1526 {BIND_ACTION_CURSOR_RIGHT_WORD, m_ctrl, {{XKB_KEY_Right}}},1527 1528+ {BIND_ACTION_DELETE_LINE, m_ctrl_shift, {{XKB_KEY_BackSpace}}},1529+1530 {BIND_ACTION_DELETE_PREV, m_none, {{XKB_KEY_BackSpace}}},1531 {BIND_ACTION_DELETE_PREV, m_ctrl, {{XKB_KEY_h}}},1532 1533 {BIND_ACTION_DELETE_PREV_WORD, m_ctrl, {{XKB_KEY_BackSpace}}},241 unmodified linesmodified:fuzzel.ini+1 added
77 unmodified lines78 # cursor-right=Right Control+f79 # cursor-right-word=Control+Right Mod1+f80 # cursor-home=Home Control+a81 # cursor-end=End Control+e82+# delete-line=Control+Shift+BackSpace83 # delete-prev=BackSpace Control+h84 # delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w85 # delete-line-backward=Control+u86 # delete-next=Delete KP_Delete Control+d35 unmodified linesmodified:key-binding.h+1 added
12 unmodified lines13 BIND_ACTION_CURSOR_LEFT,14 BIND_ACTION_CURSOR_LEFT_WORD,15 BIND_ACTION_CURSOR_RIGHT,16 BIND_ACTION_CURSOR_RIGHT_WORD,17+ BIND_ACTION_DELETE_LINE,18 BIND_ACTION_DELETE_PREV,19 BIND_ACTION_DELETE_PREV_WORD,20 BIND_ACTION_DELETE_LINE_BACKWARD,21 BIND_ACTION_DELETE_NEXT,84 unmodified linesmodified:wayland.c+6 added
648 unmodified lines649 case BIND_ACTION_CURSOR_RIGHT_WORD:650 *refresh = prompt_cursor_next_word(wayl->prompt);651 return true;652 653+ case BIND_ACTION_DELETE_LINE:654+ *refresh = prompt_erase_all(wayl->prompt);655+ if (*refresh)656+ matches_update(wayl->matches);657+ return true;658+659 case BIND_ACTION_DELETE_PREV:660 *refresh = prompt_erase_prev_char(wayl->prompt);661 if (*refresh)662 matches_update(wayl->matches);2148 unmodified lines