st
simple terminal
git clone https://9o.is/git/st.git
commit 72a8acc40cbc2fe2e2e50e65bf21f784513685a5 parent d5ec2a54316e7c61ac3f70d11daa39b4309c31de Author: noname@inventati.org <noname@inventati.org> Date: Sun, 13 Apr 2014 20:21:32 +0400 Simplify techo Remove special case for \e because it is handled well by "control code" case. Diffstat:
| M | st.c | | | 5 | +---- |
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/st.c b/st.c @@ -2318,10 +2318,7 @@ techo(char *buf, int len) { for(; len > 0; buf++, len--) { char c = *buf; - if(c == '\033') { /* escape */ - tputc("^", 1); - tputc("[", 1); - } else if(c < '\x20') { /* control code */ + if(c < '\x20') { /* control code */ if(c != '\n' && c != '\r' && c != '\t') { c |= '\x40'; tputc("^", 1);