aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/termptyesc.c2
-rw-r--r--src/bin/termptyops.c1
-rwxr-xr-xtests/decawm.sh49
-rw-r--r--tests/tests.results3
4 files changed, 52 insertions, 3 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index ab7a6f7..c00a3e8 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -329,7 +329,7 @@ _handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b,
mode);
break;
case 7:
- DBG("set wrap mode to %i", mode);
+ DBG("DECAWM: set/reset wrap mode to %i", mode);
ty->termstate.wrap = mode;
break;
case 8:
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index c762f05..ad6bf62 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -258,7 +258,6 @@ termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len)
{
ty->cursor_state.cx = max_right - offset;
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, max_right);
- return;
}
TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, max_right);
}
diff --git a/tests/decawm.sh b/tests/decawm.sh
new file mode 100755
index 0000000..1060754
--- /dev/null
+++ b/tests/decawm.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#set color
+printf '\033[46;31;3m'
+# fill space with E
+printf '\033#8'
+
+# set wrap mode
+printf '\033[?7h'
+# move to 1; 75
+printf '\033[1;75Habcdefghijkl'
+# reset wrap mode
+printf '\033[?7l'
+# move to 3; 75
+printf '\033[3;75Habcdefghijkl'
+
+
+# set top/bottom margins:
+printf '\033[10;20r'
+# allow left/right margins
+printf '\033[?69h'
+# set left/right margins:
+printf '\033[5;15s'
+# fill margin with @
+printf '\033[64;10;5;20;15$x'
+
+# set wrap mode
+printf '\033[?7h'
+# move
+printf '\033[12;12Habcdefghijkl'
+# reset wrap mode
+printf '\033[?7l'
+# move
+printf '\033[15;12Habcdefghijkl'
+
+
+# set left/right margins:
+printf '\033[25;35s'
+# fill margin with @
+printf '\033[64;10;25;20;35$x'
+# restrict cursor
+printf '\033[?6h'
+# set wrap mode
+printf '\033[?7h'
+# move
+printf '\033[2;5Habcdefghijkl'
+# reset wrap mode
+printf '\033[?7l'
+# move
+printf '\033[5;5Habcdefghijkl'
diff --git a/tests/tests.results b/tests/tests.results
index d99ef85..0991e2a 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -35,4 +35,5 @@ dch.sh 40cf655681c098251f0dc3e7733c4db9
cnl.sh 1f1512179c8e47e4bd880142774a3c66
cpl.sh 9145c88adb762a6a59c5bf69191b949e
cup.sh 11f5939a6cc990f6a7b9d1730ab3a8bf
-decaln.sh 38ca494fb468752d510daff797f7c40c
+decaln.sh 9c0cf4de336193bcdaed6ba6c0d6f590
+decawm.sh 84321e76f07b40cf9462238ec0919dc0