[PATCH] add mouse scrolling arrowpress emulation when in altscreen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pangoterm |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Adds an option to emulate arrow presses when the scrolling in altscreen. I originally saw such a feature in <https:/
I hope I coded this correctly! If I did not, feel free to change it to how you see fit.
The patch is inline and attached.
diff --git a/pangoterm.c b/pangoterm.c
index e403896..82564d3 100644
--- a/pangoterm.c
+++ b/pangoterm.c
@@ -19,6 +19,8 @@ CONF_INT(
CONF_BOOL(
CONF_BOOL(
+CONF_BOOL(
+
CONF_INT(
CONF_INT(
@@ -1152,8 +1154,21 @@ static VTermScreenCall
static void scroll_
{
- if(pt->
+ if(pt->
+ if (CONF_altscreen
+ VTermKey which_arrow;
+ if(delta > 0) {
+ which_arrow = VTERM_KEY_UP;
+ } else if(delta < 0) {
+ which_arrow = VTERM_KEY_DOWN;
+ }
+ for(int i=0; i < ((which_arrow == VTERM_KEY_DOWN) ? -delta : delta); i++) {
+ vterm_input_
+ }
+ term_flush_
+ }
return;
+ }
if(delta > 0) {
if(
diff --git a/pangoterm.cfg b/pangoterm.cfg
index 79ff996..2c95249 100644
--- a/pangoterm.cfg
+++ b/pangoterm.cfg
@@ -20,6 +20,7 @@
# cursor_
# bold_highbright = true
# altscreen = true
+# altscreen_scroll = false
# term = "xterm"
# scrollback_size = 1000
# scrollbar_width = 3
Changed in pangoterm: | |
status: | New → Triaged |
New version. A bit of cleaning. Horizontal scrolling in altscreen.