From 686f5d035cc111a6a18d918ef60929f24b0cb424 Mon Sep 17 00:00:00 2001 From: Ben Huntsman Date: Thu, 12 May 2022 16:52:00 -0700 Subject: [PATCH] acme: Don't move the mouse if button depressed Fixes #19 --- src/cmd/acme/cols.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c index 63247a84..30f64c8e 100644 --- a/src/cmd/acme/cols.c +++ b/src/cmd/acme/cols.c @@ -149,7 +149,10 @@ coladd(Column *c, Window *w, Window *clone, int y) savemouse(w); /* near the button, but in the body */ - moveto(mousectl, addpt(w->tag.scrollr.max, Pt(3, 3))); + /* don't move the mouse to the new window if a mouse button is depressed */ + if(!mousectl->m.buttons) + moveto(mousectl, addpt(w->tag.scrollr.max, Pt(3, 3))); + barttext = &w->body; return w; }