[hackers] [st] customize word delimiters on double click selection
diff --git a/config.def.h b/config.def.h
index b0bc752..650c786 100644
--- a/config.def.h
+++ b/config.def.h
_AT__AT_ -9,6 +9,9 @@ static char font[] = "Liberation
Mono:pixelsize=12:antialias=false:autohint=fals
static int borderpx = 2;
static char shell[] = "/bin/sh";
+/* word delimiters on double click selection */
+static char worddelimiters[] = " `'\"()[]{}";
+
/* timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
diff --git a/st.c b/st.c
index ae7bc2d..7a8380f 100644
--- a/st.c
+++ b/st.c
_AT__AT_ -701,7 +701,7 @@ 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;
Received on Mon Apr 29 2013 - 07:03:41 CEST
This archive was generated by hypermail 2.3.0
: Mon Apr 29 2013 - 07:12:11 CEST