ref: b2faef784b96bd65060ed9604412bbdfcb5b273b
parent: bf1135d2522f8b0052187253f972ec59cfbe9f9f
author: phil9 <telephil9@gmail.com>
date: Mon Aug 22 04:47:36 EDT 2022
make right-click menu available in pager
--- a/pager.c
+++ b/pager.c
@@ -309,12 +309,8 @@
return;
if(nparts > 0 && ptinrect(m.xy, partsr))
partclick(m);
- else if(ptinrect(m.xy, textr)){
- if(m.buttons == 4)
- mesgmenuhit(3, m);
- else
- textmouse(&text, mc);
- }
+ else if(ptinrect(m.xy, textr))
+ textmouse(&text, mc);
}
void
--- a/text.c
+++ b/text.c
@@ -8,6 +8,8 @@
#include <regexp.h>
#include "w.h"
+extern void mesgmenuhit(int, Mouse);
+
typedef struct Highlight Highlight;
struct Highlight
@@ -410,6 +412,8 @@
}
}else if(mc->buttons == 2){
menu2hit(t, mc);
+ }else if(mc->buttons == 4){
+ mesgmenuhit(3, *mc);
}else if(mc->buttons == 8){
n = mousescrollsize(t->vlines);
scroll(t, -n);