bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vte-256color gives stray input bytes when enabling mouse events (sin


From: Thomas Dickey
Subject: Re: vte-256color gives stray input bytes when enabling mouse events (since 20230514)
Date: Sat, 14 Oct 2023 14:28:54 -0400

On Sat, Oct 14, 2023 at 04:05:48PM +0200, Benno Schulenberg wrote:
> 
> Hi,
> 
> Since ncurces-6.4-20230514, making mouse events visible
> generates the byte sequence 1B 5B 49 on the input stream
> when using the vte-256color terminal description on an
> Xfce Terminal.  Going back to ncurses-6.4-20230506 these
> bytes do not appear.
> 
> I noticed this while toggling mouse support in nano with
> M-M: when toggling it on, nano does a PageUp, as 1B 5B 49
> (ESC [ I) is the escape sequence for PgUp on a BSD console.

hmm - that's three issues

a) I haven't tested Xfce Terminal recently, but as I recall, it uses an
   older version of VTE.

        # XFCE Terminal 0.2.5.4beta2
        #
        # This is based on some of the same source code, e.g., the VTE library, 
as
        # gnome-terminal, but has fewer features, fails more screens in vttest.
        # Since most of the terminfo-related behavior is due to the VTE library,
        # the terminfo is the same as gnome-terminal.
        xfce|Xfce Terminal,
                use=vte-2008,

   though even on Debian oldstable, that terminal description is old:

        ii xfce4-terminal 0.8.10-1 amd64 Xfce terminal emulator

   But I'd start with that, update it and see how it compares with vte-256color

b) 1004 comes from (referring to terminfo.src)

        # 2023-05-08
        #       + add mode 1004 to xterm+sm+1006 from xterm #380 -TD

   described here:

        # XF is set/true for terminals which support the xterm 
focus-in/focus-out
        #    escape sequences sent from the terminal to the host when private 
mode
        #    1004 is set.  Those are defined as kxIN and kxOUT, to take 
advantage of
        #    ncurses keypad mode to interpret them like a function key.  
Because the
        #    1004 mode is usually combined with other flags to set the mouse 
protocol,
        #    this flag provides an application with the information that the 
focus
        #    mode is assumed to be set, e.g., in XM.

c) Actually I didn't have BSD (or SCO) console in mind when adding focus in/out
   to xterm:

        Patch #224 - 2007/2/11
        * add  control  sequences  for enabling/disabling focus in/out event
          reporting (request by Bram Moolenaar).

Turning the feature on in xterm's building block (xterm+sm+1006) which
happens to be used in the VTE description seemed safe enough.  I inspected
each terminal description using that block, and verified that it would
work -- or amended the description to omit the block.  That was motivated by
some discussion with Bram Moolenaar last winter, on ensuring that terminals
which supported the feature would have it in the terminal description.
 
> Comparing the older and the newer vte-256color terminal
> descriptions yields nothing:
> 
>   $ infocmp vte-256color-old vte-256color-new

try "-x" option

>   comparing vte-256color-old to vte-256color-new.
>       comparing booleans.
>       comparing numbers.
>       comparing strings.
> 
> But looking at the hex dumps, there appears to be a "1004;"
> added in the newer description.
> 
> Maybe I'm somehow compiling ncurses wrong?  I build it like
> this:
> 
>   export NCURSESW_LIBS="-l:libncursesw.so -L/usr/local/lib"
> 
>   ./configure -C --enable-widec --enable-pc-files --with-shared \
>       --without-ada --without-manpages --without-tests \
>         --without-cxx-binding --disable-stripping \
>         --disable-rpath-hack --disable-termcap --prefix=/usr/local
> 
> Benno

well... updating the "xfce" entry and adding "xfce-256color" would be
helpful.  But if it's still an old version of VTE, then there's not
much more that I can do.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]