From a673653774066eaefd9a3de8822309f8e467b4f8 Mon Sep 17 00:00:00 2001 From: mintycube <90507714+mintycube@users.noreply.github.com> Date: Sat, 12 Oct 2024 12:10:33 +0500 Subject: [PATCH] update config with options for new patches --- config.h | 8 ++++++-- patches.h | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index 92287aa..d47182f 100644 --- a/config.h +++ b/config.h @@ -379,8 +379,8 @@ static MouseShortcut mshortcuts[] = { { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, #endif // SCROLLBACK_MOUSE_PATCH #if SCROLLBACK_MOUSE_ALTSCREEN_PATCH || REFLOW_PATCH - { XK_NO_MOD, Button4, kscrollup, {.i = 1}, 0, S_PRI }, - { XK_NO_MOD, Button5, kscrolldown, {.i = 1}, 0, S_PRI }, + { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, S_PRI }, + { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, S_PRI }, { XK_ANY_MOD, Button4, ttysend, {.s = "\031"}, 0, S_ALT }, { XK_ANY_MOD, Button5, ttysend, {.s = "\005"}, 0, S_ALT }, #else @@ -477,6 +477,10 @@ static Shortcut shortcuts[] = { #if INVERT_PATCH { TERMMOD, XK_X, invert, { 0 } }, #endif // INVERT_PATCH + #if OSC133_PATCH + { ControlMask, XK_Page_Up, scrolltoprompt, {.i = -1}, S_PRI }, + { ControlMask, XK_Page_Down, scrolltoprompt, {.i = 1}, S_PRI }, + #endif // OSC133_PATCH }; /* diff --git a/patches.h b/patches.h index 5a3b099..4f7a976 100644 --- a/patches.h +++ b/patches.h @@ -301,6 +301,13 @@ */ #define OPENURLONCLICK_PATCH 0 +/* This patch allows jumping between prompts by utilizing the OSC 133 escape sequence + * emitted by shells. Must be used with either reflow or scrollback patch. + * + * https://codeberg.org/dnkl/foot#jumping-between-prompts + */ +#define OSC133_PATCH 0 + /* Reflow. * Allows st to be resized without cutting off text when the terminal window is made larger again. * Text wraps when the terminal window is made smaller.