---
config.def.h | 3 ++-
st.c | 9 +++++++--
st.h | 4 +++-
x.c | 2 +-
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/config.def.h b/config.def.h
index 91ab8cab2c70..bbac6bccd1c7 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -459,3 +459,3 @@ static Key key[] = {
* Button1Mask is always unset, to make masks match between ButtonPress.
- * ButtonRelease and MotionNotify.
+ * ButtonRelease and MotionNotify. forcemousemod is always unset too.
* If no match is found, regular selection is used.
_AT_@ -464,2 +464,3 @@ static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
+ [SEL_LINES] = Mod1Mask | ControlMask,
};
diff --git a/st.c b/st.c
index 62def59f17cb..31705d21718d 100644
--- a/st.c
+++ b/st.c
_AT_@ -402,3 +402,3 @@ selinit(void)
sel.mode = SEL_IDLE;
- sel.snap = 0;
+ sel.snap = SNAP_NONE;
sel.ob.x = -1;
_AT_@ -432,3 +432,3 @@ selstart(int col, int row, int snap)
- if (sel.snap != 0)
+ if (sel.snap != SNAP_NONE)
sel.mode = SEL_READY;
_AT_@ -455,2 +455,7 @@ selextend(int col, int row, int type, int done)
+ if (type == SEL_LINES)
+ sel.snap = SNAP_LINE;
+ else
+ sel.snap = SNAP_NONE;
+
sel.oe.x = col;
diff --git a/st.h b/st.h
index fd3b0d8501e7..bb19480532ff 100644
--- a/st.h
+++ b/st.h
_AT_@ -46,3 +46,4 @@ enum selection_type {
SEL_REGULAR = 1,
- SEL_RECTANGULAR = 2
+ SEL_RECTANGULAR = 2,
+ SEL_LINES = 3
};
_AT_@ -50,2 +51,3 @@ enum selection_type {
enum selection_snap {
+ SNAP_NONE = 0,
SNAP_WORD = 1,
diff --git a/x.c b/x.c
index 2a3bd384c465..4133a169bfc2 100644
--- a/x.c
+++ b/x.c
_AT_@ -496,3 +496,3 @@ bpress(XEvent *e)
} else {
- snap = 0;
+ snap = SNAP_NONE;
}
--
2.38.0
This archive was generated by hypermail 2.3.0 : Tue Oct 18 2022 - 16:36:37 CEST