Allow more complex delimiters for word selections.
[st.git] / st.c
diff --git a/st.c b/st.c
index 0f47d6d..5251e70 100644 (file)
--- 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;
                }