mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-02 09:11:15 -03:00
Make \x the same as \X
Up to now, in normal locales \x was essentially the same as \X, except that it errored if given a value > 0x7f. That's kind of annoying and useless. A subtle change is that `\xHH` now represents the character (if any) encoded by the byte value "HH", so even for values <= 0x7f if that's not the same as the ASCII value we would diverge. I do not believe anyone has ever run fish on a system where that distinction matters. It isn't a thing for UTF-8, it isn't a thing for ASCII, it isn't a thing for UTF-16, it isn't a thing for any extended ASCII scheme - ISO8859-X, it isn't a thing for SHIFT-JIS. I am reasonably certain we are making that same assumption in other places. Fixes #1352
This commit is contained in:
@@ -604,10 +604,7 @@ static void color_string_internal(const wcstring &buffstr, highlight_spec_t base
|
||||
in_pos++;
|
||||
break;
|
||||
}
|
||||
case L'x': {
|
||||
in_pos++;
|
||||
break;
|
||||
}
|
||||
case L'x':
|
||||
case L'X': {
|
||||
max_val = BYTE_MAX;
|
||||
in_pos++;
|
||||
|
||||
Reference in New Issue
Block a user