<mortenivar>
Hi, maybe difficult to answer - but I use the Jed editor and I like to be able to move the editing point with the click of the left mouse button. This works in xterm/urxvt etc. but not in foot. Does foot use the terminfo database? Could someone give me a hint on how to solve this problem?
<cbb>
mortenivar: foot doesn't "use" the terminfo database, but there's a terminfo entry for foot
<mortenivar>
OK. It's odd, then, that when running urxvt with "foot" as $TERM, mouse clicks work in Jed. So apparently I cannot solve it by tinkering with the terminfo description. What might I look at instead?
<cbb>
foot does support the most commonly used mouse modes, so it's likely an issue with something Jed is doing
<mortenivar>
Probably, yes. The configuration variable in Jed to make it work is "enable_xmouse ();" So it is some "X event"? But I have enabled xwayland, so shouldn't it be able to work with foot?
<dnkl>
jed is hardcoded to only enable mouse mode when TERM starts with "xterm"
<dnkl>
but it looks like it tries to fallback to X10. foot does not support this mode
<mortenivar>
@dnkl: This does not ring true. I do not use a $TERM that begins with "xterm" and yet it works with e.g. urxvt under wayland even with $TERM=foot!
<dnkl>
urxvt probably implements the X10 mode
<dnkl>
this is a legacy mode hardly ever used, hence the lack of support in foot. This is the first time I see it being used
<dnkl>
I would expect foot to log a warning if jed is indeed trying to enable the X10 mode
<mortenivar>
If I were to phrase a constructive request to the author of Jed, how might I put it?
<dnkl>
I think we can implement this in foot. The X10 protocol looks super simple
<cbb>
X10 mouse mode limits x/y coordinates to 223 though, so it's quite flawed
<mortenivar>
For my purposes, I think it suffices. It would be great if you could implement support for this.
<dnkl>
true, but so does the regular mode too, by default (non-SGR)
<dnkl>
A constructive request to Jed would be to add support for the SGR mouse mode, for terminals in general (and not just xterm)
<mortenivar>
Very good, Thank you.
<cbb>
dnkl: yeah that's true, I guess I automatically compare the other modes to SGR, since that seems like the only sane one out of the bunch
<mortenivar>
On the other hand, If you implement support for the X10 protocol, my problem will also be solved. Btw, neither kitty nor alacritty seem to support the X10 protocol.
<dnkl>
mortenivar: besides the limitations of the coordinator, x10 only supports mouse button presses. The newer protocols also support button release, drag events, and motion events.
<dnkl>
*coordinates
<mortenivar>
I only need the button press.
<cbb>
the X10 encoding scheme also violates ECMA-48, which is pretty bad
<mortenivar>
Will implementing support for the X10 protocol it be anathema to you, then?
<mortenivar>
Do you have any idea, how much work it would be for the author of Jed to add support for the SGR mouse mode in general? My gut feeling is that it probably won't be very high on his todo-list ...
<mortenivar>
s/protocol it be anathema/protocol be anathema
<cbb>
mortenivar: dnkl has the final say on that, but from my perspective very few apps use the X10 protocol and it has big flaws
<cbb>
so it seems like it'd make more sense for Jed to add support for SGR mouse modes instead of foot adding support for X10 mouse modes
<cbb>
it's hard to say how much work it'd be, without taking a closer look at the Jed codebase
<dnkl>
just removing the TERM check might be good enough; not sure why they think it's important to not emit ?1000h on non-xterm terminals, while emitting ?9h on every other terminal is ok...
<dnkl>
I do think it would make much more sense to update Jed to use more modern protocols, than adding support to foot for a legacy protocol not used by anyone else..
<mortenivar>
All right. Thanks a lot for your answers.
<cbb>
btw, addendum to what I said about ECMA-48: it seems like it doesn't actually "violate" the spec, it just encodes the coordinates outside of the escape sequence
<cbb>
which is still kind of problematic
<mortenivar>
Jed is a great, extremely modular editor. I just found out, that I may simply solve the issue in the SLang extension file, called "mousex.sl". I just changed line 90 from "if (strncmp (getenv ("TERM"), "xterm", 5))" to "if (strncmp (getenv ("TERM"), "foot", 4))" and it works! ;-)
bgs has joined #foot
mortenivar has quit [Quit: leaving]
caveman has quit [Ping timeout: 255 seconds]
caveman has joined #foot
caveman has quit [Remote host closed the connection]
caveman has joined #foot
Nulo has quit [Ping timeout: 252 seconds]
Nulo has joined #foot
taupiqueur1 has joined #foot
taupiqueur has quit [Ping timeout: 252 seconds]
taupiqueur1 has quit [Ping timeout: 248 seconds]
taupiqueur1 has joined #foot
bgs has quit [Remote host closed the connection]
taupiqueur2 has joined #foot
taupiqueur1 has quit [Ping timeout: 248 seconds]
cbb has quit [Quit: WeeChat 3.8]
taupiqueur2 has quit [Ping timeout: 248 seconds]
taupiqueur2 has joined #foot
itshog has joined #foot
pants has quit [Remote host closed the connection]