[dev] [st] [PATCH 2/3] Do not use tmoveto in tputtab.

From: noname <noname_AT_inventati.org>
Date: Mon, 13 Apr 2015 12:03:14 +0000

tmoveto resets CURSOR_WRAPNEXT.

Simple testcase:

for i in $(seq 1 200); do
        printf '\t.';
        usleep 100000;
        printf '\t_AT_';
        usleep 100000;
done

In st executing this script causes _AT_ and . to overwrite each other in
the last column.
---
 st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/st.c b/st.c
index db35e71..e01df66 100644
--- a/st.c
+++ b/st.c
_AT_@ -2393,7 +2393,7 @@ tputtab(int n) {
 			for(--x; x > 0 && !term.tabs[x]; --x)
 				/* nothing */ ;
 	}
-	tmoveto(x, term.c.y);
+	term.c.x = LIMIT(x, 0, term.col-1);
 }
 
 void
-- 
1.8.4
Received on Mon Apr 13 2015 - 14:03:14 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 13 2015 - 14:12:13 CEST