mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
key: Actually do engage legacy mode if first char is control
This was already in the comment. Fixes #10450
This commit is contained in:
parent
cad63263d2
commit
6558c0a8e5
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ Notable backwards-incompatible changes
|
|||
Since ``,`` and ``-`` act as separators, there are some cases where they need to be written as ``comma`` and ``minus`` respectively.
|
||||
- To minimize gratuitous breakage, the key argument to ``bind`` is parsed using the old syntax in two cases:
|
||||
|
||||
- If the key argument starts with a raw escape character (``\e``). Besides backwards compatibility, these "raw" bindings can be useful for keys that fish can't decode yet.
|
||||
- If the key argument starts with a raw escape character (``\e``) or ascii control character. Besides backwards compatibility, these "raw" bindings can be useful for keys that fish can't decode yet.
|
||||
- If the key argument consists of exactly two characters, contains none of ``,`` or ``-`` and is not a named key.
|
||||
|
||||
- Fish no longer supports terminals that fail to ignore OSC or CSI sequences they don't recognize.
|
||||
|
|
|
@ -238,7 +238,7 @@ pub(crate) fn parse_keys(value: &wstr) -> Result<Vec<Key>, WString> {
|
|||
&& !value.contains(KEY_SEPARATOR)
|
||||
&& !KEY_NAMES.iter().any(|(_codepoint, name)| name == value)
|
||||
&& value.as_char_slice()[0] != 'F')
|
||||
|| first == '\x1b'
|
||||
|| first == '\x1b' || first < ' '
|
||||
{
|
||||
// Hack: treat as legacy syntax (meaning: not comma separated) if
|
||||
// 1. it doesn't contain '-' or ',' and is short enough to probably not be a key name.
|
||||
|
|
Loading…
Reference in a new issue