summary refs log tree commit diff
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/term.c b/term.c
index bb5d195..48fed10 100644
--- a/term.c
+++ b/term.c
@@ -118,8 +118,8 @@ static char updateNUL(wchar_t ch) {
 enum C1 {
 	RI  = 'M',
 	CSI = '[',
-	OSC = ']',
 	ST  = '\\',
+	OSC = ']',
 };
 
 static char updateESC(wchar_t ch) {
@@ -128,12 +128,12 @@ static char updateESC(wchar_t ch) {
 		discard = false;
 		return NUL;
 	}
+
 	switch (ch) {
-		case '(': discard = true; return ESC;
-		case '=': return NUL;
-		case '>': return NUL;
+		break; case CSI: return CSI;
+		break; case OSC: return OSC;
 
-		case RI: {
+		break; case RI: {
 			move(
 				cell(scroll.top + 1, 0), cell(scroll.top, 0),
 				cols * (scroll.bot - scroll.top)
@@ -141,10 +141,13 @@ static char updateESC(wchar_t ch) {
 			clear(cell(scroll.top, 0), cell(scroll.top, cols - 1));
 		}
 
-		case CSI: return CSI;
-		case OSC: return OSC;
-		default:  return unhandled("ESC %lc", ch);
+		break; case '(': discard = true; return ESC;
+		break; case '=': // ignore
+		break; case '>': // ignore
+
+		break; default:  return unhandled("ESC %lc", ch);
 	}
+	return NUL;
 }
 
 enum SGR {
b1d470adf1e0a&follow=1'>Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe This simplifies some things, adds support for line number tag definitions, and should enable combining htagml with other preprocessors in the future. 2021-01-12Split fields by tab onlyJune McEnroe Also don't fail hard on non-forward-search definitions. 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe