[hackers] [st] Do not use tmoveto in tputtab. || noname_AT_inventati.org

From: <git_AT_suckless.org>
Date: Mon, 13 Apr 2015 22:25:50 +0200 (CEST)

commit 9eb70a2d3ecbd96a92e5f824868500baba74b688
Author: noname_AT_inventati.org <noname_AT_inventati.org>
Date: Mon Apr 13 14:03:35 2015 +0200

    Do not use tmoveto in tputtab.
    
    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.

diff --git a/st.c b/st.c
index 6d20977..7051a4a 100644
--- a/st.c
+++ b/st.c
_AT_@ -2390,7 +2390,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
Received on Mon Apr 13 2015 - 22:25:50 CEST

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