diff options
author | Hiltjo Posthuma | 2014-06-03 17:55:53 +0200 |
---|---|---|
committer | Roberto E. Vargas Caballero | 2014-06-04 21:09:07 +0200 |
commit | bb6dc332067fddcdcb0940ebc9b5f41c61429c46 (patch) | |
tree | 4f0422645b2d5faa5e8c15c43b067e50a6c31406 | |
parent | 2323e962e6bcddba42fd8be977088fb63ed8844c (diff) | |
download | st-bb6dc332067fddcdcb0940ebc9b5f41c61429c46.tar.gz st-bb6dc332067fddcdcb0940ebc9b5f41c61429c46.tar.xz st-bb6dc332067fddcdcb0940ebc9b5f41c61429c46.zip |
tiny cleanup
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
-rw-r--r-- | st.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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) @@ -965,13 +965,10 @@ getsel(void) { * after the visible text '\n' 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++ = '\n'; } } |