--- st.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index e0c64e3..912a37e 100644 --- a/st.c +++ b/st.c _AT_@ -711,8 +711,9 @@ selsnap(int mode, int *x, int *y, int direction) { */ for(;;) { if(direction < 0 && *x <= 0) { - if(*y > 0 && term.line[*y - 1][term.col-1].mode - & ATTR_WRAP) { + if(*y > 0 && term.line[*y-1][term.col-1].mode & ATTR_WRAP + && !strchr(worddelimiters, + term.line[*y-1][term.col-1].c[0])) { *y -= 1; *x = term.col-1; } else { _AT_@ -720,8 +721,8 @@ selsnap(int mode, int *x, int *y, int direction) { } } if(direction > 0 && *x >= term.col-1) { - if(*y < term.row-1 && term.line[*y][*x].mode - & ATTR_WRAP) { + if(*y < term.row-1 && term.line[*y][*x].mode & ATTR_WRAP + && !strchr(worddelimiters, term.line[*y+1][0].c[0])) { *y += 1; *x = 0; } else { -- 2.0.0 -- Ivan "Colona" DelalandeReceived on Wed Jun 04 2014 - 10:29:35 CEST
This archive was generated by hypermail 2.3.0 : Wed Jun 04 2014 - 10:36:06 CEST