"Devin J. Pohly" <[email protected]> wrote:

> On Fri, Mar 16, 2018 at 11:23:08PM +0800, Ivan Tham wrote:
> > This allows MODE_ALTSCREEN to be applied to scrollback patch in x.c
> > ---
> >  st.c | 11 -----------
> >  st.h | 11 +++++++++++
> >  2 files changed, 11 insertions(+), 11 deletions(-)
> > 
> > diff --git a/st.c b/st.c
> > index 65a0cb6..1eafc0e 100644
> > --- a/st.c
> > +++ b/st.c
> > @@ -47,17 +47,6 @@
> >  /* constants */
> >  #define ISO14755CMD                "dmenu -w \"$WINDOWID\" -p codepoint: 
> > </dev/null"
> >  
> > -enum term_mode {
> > -   MODE_WRAP        = 1 << 0,
> > -   MODE_INSERT      = 1 << 1,
> > -   MODE_ALTSCREEN   = 1 << 2,
> > -   MODE_CRLF        = 1 << 3,
> > -   MODE_ECHO        = 1 << 4,
> > -   MODE_PRINT       = 1 << 5,
> > -   MODE_UTF8        = 1 << 6,
> > -   MODE_SIXEL       = 1 << 7,
> > -};
> > -
> >  enum cursor_movement {
> >     CURSOR_SAVE,
> >     CURSOR_LOAD
> > diff --git a/st.h b/st.h
> > index dac64d8..624f72f 100644
> > --- a/st.h
> > +++ b/st.h
> > @@ -52,6 +52,17 @@ enum selection_snap {
> >     SNAP_LINE = 2
> >  };
> >  
> > +enum term_mode {
> > +       MODE_WRAP        = 1 << 0,
> > +       MODE_INSERT      = 1 << 1,
> > +       MODE_ALTSCREEN   = 1 << 2,
> > +       MODE_CRLF        = 1 << 3,
> > +       MODE_ECHO        = 1 << 4,
> > +       MODE_PRINT       = 1 << 5,
> > +       MODE_UTF8        = 1 << 6,
> > +       MODE_SIXEL       = 1 << 7,
> > +};
> > +
> >  typedef unsigned char uchar;
> >  typedef unsigned int uint;
> >  typedef unsigned long ulong;
> > -- 
> > 2.16.2
> > 
> > 
>
> 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.

Reply via email to