--- st.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/st.c b/st.c index 695233b..4d383be 100644 --- a/st.c +++ b/st.c _AT_@ -719,7 +719,7 @@ selected(int x, int y) { void selsnap(int *x, int *y, int direction) { - int newx, newy, xt, yt; + int newx, newy, yt; bool delim; Glyph *gp, *prevgp; _AT_@ -739,11 +739,8 @@ selsnap(int *x, int *y, int direction) { if (!BETWEEN(newy, 0, term.row - 1)) break; - if(direction > 0) - yt = *y, xt = *x; - else - yt = newy, xt = newx; - if(!(term.line[yt][xt].mode & ATTR_WRAP)) + yt = direction > 0 ? *y : newy; + if(!(term.line[yt][term.col-1].mode & ATTR_WRAP)) break; } -- 1.8.4Received on Thu Apr 30 2015 - 23:23:15 CEST
This archive was generated by hypermail 2.3.0 : Thu Apr 30 2015 - 23:24:13 CEST