gphalkes / tilde

The Tilde text editor
395 stars 21 forks source link

Mouse support doesn't work in Kitty terminal #85

Open rdrms opened 2 years ago

rdrms commented 2 years ago

What OS are you using (including version): Ubuntu 21.10 using tilde package version incldued What terminal were you running Tilde on when you ran into the issue: Kitty

Please paste the result of running 'tilde --version':

Tilde version 1.1.2
Copyright (c) 2011-2018 G.P. Halkes
Tilde is licensed under the GNU General Public License version 3
Library versions:
  libt3config 1.0.0
  libt3highlight 0.5.0
  libt3key (through libt3widget) 0.2.10
  libt3widget 1.2.0
  libt3window 0.4.0
  libtranscript 0.3.3
  libunistring 0.0.?

Instead of allowing you to select text or click the ncurses menus in the Tilde editor (https://github.com/gphalkes/tilde), when using the Kitty terminal emulator (https://github.com/kovidgoyal/kitty) the mouse actions lead to garbage printed in the editor. Clicking and releasing the left mouse button inserts f'#f', the right mouse button "I+#I+ but these values seem to be affected by where you click inside the terminal. Other terminal applications that use the mouse appear to be fine, such as weechat (clicking buffers switches to them). GNOME Terminal, Tilix, and Konsole don't exhibit this issue with the Tilde editor.

Screenshot from 2022-01-23 17-19-34

I reported the issue to the kitty issue tracker but it was closed due to the kitty dev thinking that the issue was:

This will be a bug in tilde, most likely that it is not handling the SGR mouse reporting protocol.