jonas/tig

Terminal mouse focus reporting glitching tig since ncurses 6.4-20230514

liskin opened this issue · 5 comments

liskin commented

ncurses 6.4-20230514 unconditionally enables focus reporting in terminals supporting SGR-mouse, but tig unfortunately doesn't know how to interpret the sequences reported back to it by the terminal, so it results in those sequences triggering key bindings such as [ etc.:

Peek.2023-08-01.12-12.mp4

(Personally I don't think enabling focus reporting unconditionally was a good idea, but tig is the only app on my system that glitches. Others like htop work fine as long as the xterm+focus bits are included in the terminfo definition.)

Related issues:

This affects me too. No luck with the foot terminal and the suggestion to use the foot-extra terminfo. Nor using the latest ncurse (6.4.20230826) package.

Same with xterm.

I'd love to know any workaround

Adding the following to your .tigrc should help:

bind generic    <Esc>[I :none                   # Ignore xterm focus events
bind generic    <Esc>[O :none

I'm not sure yet whether we should fix it with this simple trick or output a \033[?1004l to revert the focus reporting activation. Let's see first if it makes it to ncurses 6.5.

Woop woop! That makes loads of sense.

I had to be careful about what I was looking for in tig. I can go back to switching windows senselessly again

Thanks a lot : )

Just wondering if this is still an issue after ncurses 6_4_20231028... Can anyone confirm ?

liskin commented

Just wondering if this is still an issue after ncurses 6_4_20231028... Can anyone confirm ?

Not an issue any more. 🎉
Tested with the 6.4+20231118-1 that's in Debian unstable now.