fish_key_reader: use char_to_symbol for verbose output

byte_to_symbol was broken because it didn't iterate by byte, it
iterated by rust-char, which is a codepoint.

So it failed for everything outside of ascii and, because of a
mistaken bound, ascii chars from 0x21 to 0x2F ("!" to "/" - all the punctuation).

char_to_symbol will print printable codepoints as-is and
others escaped. This is okay - something like `decoded from: +` or
`decoded from: ö` is entirely understandable, there is no need to tell
you that "ö" is \xc3\xb6.

This reverts commit 423e5f6c03.
This commit is contained in:
Fabian Boehm
2024-08-13 16:01:00 +02:00
parent 7fc58ee7f5
commit 357eb3cd32
3 changed files with 10 additions and 18 deletions

View File

@@ -37,6 +37,9 @@ sleep(0.020)
send("\x1B")
expect_str("# decoded from: \\e\r\n")
expect_str("bind escape 'do something'\r\n")
send("ö")
expect_str("# decoded from: ö\r\n")
expect_str("bind ö 'do something'\r\n")
send("\u1234")
expect_str("bind ሴ 'do something'\r\n")