[hackers] [st] tiny cleanup || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Wed, 04 Jun 2014 21:09:38 +0200

commit bb6dc332067fddcdcb0940ebc9b5f41c61429c46
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Tue Jun 3 17:55:53 2014 +0200

    tiny cleanup
    
    Signed-off-by: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>

diff --git a/st.c b/st.c
index 9a41c5b..2e55963 100644
--- a/st.c
+++ b/st.c
_AT_@ -920,7 +920,7 @@ bpress(XEvent *e) {
 char *
 getsel(void) {
         char *str, *ptr;
- int x, y, bufsize, size, i, ex;
+ int x, y, bufsize, size, ex;
         Glyph *gp, *last;
 
         if(sel.ob.x == -1)
_AT_@ -965,13 +965,10 @@ getsel(void) {
                  * after the visible text '
' is appended.
                  */
                 if(y == sel.ne.y) {
- i = term.col;
- while(--i > 0 && term.line[y][i].c[0] == ' ')
- /* nothing */;
                         ex = sel.ne.x;
                         if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x)
                                 ex = sel.nb.x;
- if(i < ex)
+ if(tlinelen(y) < ex)
                                 *ptr++ = '
';
                 }
         }
Received on Wed Jun 04 2014 - 21:09:38 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 04 2014 - 21:12:09 CEST