mirror of
https://github.com/alrayyes/st.git
synced 2024-11-22 19:26:22 +00:00
tiny cleanup
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
This commit is contained in:
parent
2323e962e6
commit
bb6dc33206
1 changed files with 2 additions and 5 deletions
7
st.c
7
st.c
|
@ -920,7 +920,7 @@ bpress(XEvent *e) {
|
||||||
char *
|
char *
|
||||||
getsel(void) {
|
getsel(void) {
|
||||||
char *str, *ptr;
|
char *str, *ptr;
|
||||||
int x, y, bufsize, size, i, ex;
|
int x, y, bufsize, size, ex;
|
||||||
Glyph *gp, *last;
|
Glyph *gp, *last;
|
||||||
|
|
||||||
if(sel.ob.x == -1)
|
if(sel.ob.x == -1)
|
||||||
|
@ -965,13 +965,10 @@ getsel(void) {
|
||||||
* after the visible text '\n' is appended.
|
* after the visible text '\n' is appended.
|
||||||
*/
|
*/
|
||||||
if(y == sel.ne.y) {
|
if(y == sel.ne.y) {
|
||||||
i = term.col;
|
|
||||||
while(--i > 0 && term.line[y][i].c[0] == ' ')
|
|
||||||
/* nothing */;
|
|
||||||
ex = sel.ne.x;
|
ex = sel.ne.x;
|
||||||
if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x)
|
if(sel.nb.y == sel.ne.y && sel.ne.x < sel.nb.x)
|
||||||
ex = sel.nb.x;
|
ex = sel.nb.x;
|
||||||
if(i < ex)
|
if(tlinelen(y) < ex)
|
||||||
*ptr++ = '\n';
|
*ptr++ = '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue