Introduction
Introduction Statistics Contact Development Disclaimer Help
ignore C1 control characters in UTF-8 mode - st - simple terminal
git clone git://git.suckless.org/st
Log
Files
Refs
README
LICENSE
---
commit 211964d56ee00a7d46e251cbc150afb79138ae37
parent f17abd25b376c292f783062ecf821453eaa9cc4c
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 7 Feb 2023 20:00:59 +0100
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
Diffstat:
M st.c | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/st.c b/st.c
@@ -2422,6 +2422,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
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.