X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=5251e70660909f70de4fbda7b501cf33cc14a9e3;hb=8e968739c3cfc4e9f7088a9ea360bc4f37e9ad9f;hp=0f47d6df704b882b3770a7c87a5093c3cbe19cbf;hpb=0c2b513d01697aea20bb4a2a144b55e72c625e86;p=st.git diff --git a/st.c b/st.c index 0f47d6d..5251e70 100644 --- a/st.c +++ b/st.c @@ -707,8 +707,10 @@ selsnap(int mode, int *x, int *y, int direction) { } } - if(term.line[*y][*x + direction].c[0] == ' ') + if(strchr(worddelimiters, + term.line[*y][*x + direction].c[0])) { break; + } *x += direction; }