On Tue, Mar 20, 2018 at 07:14:48PM +0800, Pickfire wrote:
> "Devin J. Pohly" <djpohly_AT_gmail.com> wrote:
> >
> > This won't work - the Term instance is now internal to st.c, and IS_SET
> > in x.c refers to win.mode (on the TermWindow instance) which doesn't
> > contain MODE_ALTSCREEN.
> >
> > How about checking it in kscrollup/kscrolldown, over on the st.c side of
> > things? (To be honest, the ^E/^Y behavior already seems like kind of a
> > compatibility hack for programs that lack actual mouse reporting.)
> >
> > *dp
> >
> >
> > --
> > <><
>
> Ah, thanks a lot for the suggestion. That brings benefit as well which
> does not break other mouse keys.
>
> But this patched I was already using it fine though, no issues here.
>
The patch will apply fine but will simply not work as intended. It
checks bit 2 of win.mode, which is MODE_APPKEYPAD, not MODE_ALTSCREEN.
Moving the enumeration into st.c after dividing up the mode bits helped
prevent mistaken use of the wrong ones by turning the mistake into a
compile error.
(I do like the way that scrollback implements mouse shortcuts though; it
feels more consistent and general. I could possibly see that making it
into mainline.)
I've revised the scrollback patches to work well with the new code and
attached the result. Not proposing these for mainline, but as an update
to the wiki patch.
*dp
--
<><
Received on Tue Mar 20 2018 - 18:15:02 CET