diff options
| author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-06-03 17:55:53 +0200 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-06-04 21:09:07 +0200 |
| commit | bb6dc332067fddcdcb0940ebc9b5f41c61429c46 (patch) | |
| tree | 4f0422645b2d5faa5e8c15c43b067e50a6c31406 | |
| parent | 2323e962e6bcddba42fd8be977088fb63ed8844c (diff) | |
| download | st-bb6dc332067fddcdcb0940ebc9b5f41c61429c46.tar.gz 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) { | |||
| 920 | char * | 920 | char * |
| 921 | getsel(void) { | 921 | getsel(void) { |
| 922 | char *str, *ptr; | 922 | char *str, *ptr; |
| 923 | int x, y, bufsize, size, i, ex; | 923 | int x, y, bufsize, size, ex; |
| 924 | Glyph *gp, *last; | 924 | Glyph *gp, *last; |
| 925 | 925 | ||
| 926 | if(sel.ob.x == -1) | 926 | if(sel.ob.x == -1) |
| @@ -965,13 +965,10 @@ getsel(void) { | |||
| 965 | * after the visible text '\n' is appended. | 965 | * after the visible text '\n' is appended. |
| 966 | */ | 966 | */ |
| 967 | if(y == sel.ne.y) { | 967 | if(y == sel.ne.y) { |
| 968 | i = term.col; | ||
| 969 | while(--i > 0 && term.line[y][i].c[0] == ' ') | ||
| 970 | /* nothing */; | ||
| 971 | ex = sel.ne.x; | 968 | ex = sel.ne.x; |
| 972 | if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x) | 969 | if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x) |
| 973 | ex = sel.nb.x; | 970 | ex = sel.nb.x; |
| 974 | if(i < ex) | 971 | if(tlinelen(y) < ex) |
| 975 | *ptr++ = '\n'; | 972 | *ptr++ = '\n'; |
| 976 | } | 973 | } |
| 977 | } | 974 | } |
