Replies: 3 comments 2 replies
-
|
I vaguely remember a discussion about this, but I am not aware of any patches that makes st scroll when selecting text beyond the last (or first) line. In principle this should be possible considering that you can still scroll using the mouse wheel while selecting text. This is arguably less convenient than a terminal that scrolls automatically. A general tip though: For work purposes I frequently need to select and copy text across hundreds of pages (e.g. logs taking several megabytes). In this case scrolling is not an effective use of my time. What I do is that I start my grep and then immediately scroll up a few lines. Eventually the grep finishes, at which point I scroll down again and I press and hold shift while selecting the first character of the starting line. Then while still holding down shift and the mouse button I hit the |
Beta Was this translation helpful? Give feedback.
-
|
That's a shame :( Then maybe I'll go back to Alacritty. Thanks for the idea. |
Beta Was this translation helpful? Give feedback.
-
|
I had a quick play around and adding this towards the end of diff --git a/x.c b/x.c
index 627e352..dc86322 100644
--- a/x.c
+++ b/x.c
@@ -855,6 +855,8 @@ brelease(XEvent *e)
void
bmotion(XEvent *e)
{
+ XMotionEvent *me = &e->xmotion;
+
#if HIDECURSOR_PATCH
if (!xw.pointerisvisible) {
#if SWAPMOUSE_PATCH
@@ -885,6 +887,14 @@ bmotion(XEvent *e)
return;
}
+ if (e->xbutton.state & Button1Mask) {
+ if (me->y < borderpx + win.ch / 2) {
+ kscrollup(&((Arg){ .i = 1 }));
+ } else if (me->y > win.h - borderpx - win.ch / 2) {
+ kscrolldown(&((Arg){ .i = 1 }));
+ }
+ }
+
mousesel(e, 0);
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a patch that solves the problem that when I want to select text in the terminal that spans multiple pages, if I start selecting with the mouse and reach the bottom of the window, it continues to scroll (as in Alacritty, for example)?
Beta Was this translation helpful? Give feedback.
All reactions