diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-02-07 20:00:59 +0100 |
---|---|---|
committer | Rafael Marçalo <raroma09@gmail.com> | 2023-02-07 23:18:24 +0000 |
commit | 54659c30d26e4f2aec496b72c480589578722865 (patch) | |
tree | 19a9d2ee830fe4f61211be10e760e5c37fae68b7 | |
parent | 048fb83b5c32f67a94c630b810dc68b998331b91 (diff) |
ignore C1 control characters in UTF-8 mode
Ignore processing and printing C1 control characters in UTF-8 mode.
These are in the range: 0x80 - 0x9f.
By default in st the mode is set to UTF-8.
This matches more the behaviour of xterm with the options -u8 or +u8 also.
Also see the xterm resource "allowC1Printable".
Let me know if this breaks something, in most cases I don't think so.
As usual a very good reference is:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
-rw-r--r-- | st.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2510,6 +2510,9 @@ check_control_code: * they must not cause conflicts with sequences. */ if (control) { + /* in UTF-8 mode ignore handling C1 control characters */ + if (IS_SET(MODE_UTF8) && ISCONTROLC1(u)) + return; tcontrolcode(u); /* * control codes are not shown ever |