input: readline-style editing keys; formatting accels move to Alt - #7
Open
rubinlinux wants to merge 1 commit into
Open
input: readline-style editing keys; formatting accels move to Alt#7rubinlinux wants to merge 1 commit into
rubinlinux wants to merge 1 commit into
Conversation
Add Emacs/readline bindings to the input widget: Ctrl-A/E move to start/end of line, Ctrl-B/F move by character, Ctrl-U/K kill to start/end, Ctrl-W deletes the previous word, Ctrl-D deletes the next character. Kills go through a new delete_range_bytes() helper that takes an undo snapshot and fixes up the cursor. Select-all moves from Ctrl-A to Ctrl-/. Since Ctrl-O/B/K/I/U/R are now claimed by the editing keys, move the default IRC formatting-code accelerators (reset, bold, color, italic, underline, reverse) to Alt-O/B/K/I/U/R.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Emacs/readline-style editing bindings to the custom input widget (hex-input-edit):
Kill operations go through a new
delete_range_bytes()helper that takes an undo snapshot and fixes up the cursor/selection.Since Ctrl-O/B/K/I/U/R are now claimed by editing keys, the default IRC formatting-code accelerators (reset, bold, color, italic, underline, reverse) move to Alt-O/B/K/I/U/R in
fkeys.c.Note for existing installs
The
fkeys.cchange only affects the default keybinding set. Users with a saved keybindings config will keep the old Ctrl accelerators, which may shadow the new readline keys depending on which handler wins — worth a manual test with a pre-existing config before merge.