Untangles the keystrokes ctrl-h and backspace #445
Merged
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.
Untangles the keystrokes ctrl-h and backspace
Based on our discussion in #444, this seems to me like an obvious and simple change. But feel free to ignore it if you have any doubts (in particular since at some point in the past you felt the need to map the two keystrokes to the same
Key; maybe there was a good reason for it after all).Effectively, as I see it, this adds the possibility to define separate key bindings for
ctrl_handbackspacein the config file, while not changing the default behavior of tiny at all.Of course, there is now also the question of what action
ctrl-hshould be mapped to by default. But it seems to be standard to have it do the same asbackspace, namely to delete the character before the cursor. At least I have checked that this is also the default behavior of vim, helix and the fish shell.If you accept this PR, then I am not so sure about #444 anymore since (as you also point out in the discussion there) it taints
libtiny_tui/src/key_map.rswith low-level knowledge about equality of certain key combinations for very little (and now even less) gain.