Micah Cowan wrote:
A.J.Mechelynck wrote:
Micah Cowan wrote:
[...]
But you already have hacked support into your programs for mouse
support. Now that you've done that, couldn't you just open it up a bit?
Is there anything wrong with always recognizing the appropriate xterm
sequences (provided that they don't first match a valid terminfo entry)?
This is the approach that elinks seems to take, and I don't see any
particular reason why vim couldn't do this as well.
[...]
There are conflicts between xterm mouse codes and DEC mouse codes. See
":help 'ttymouse'" for details (and, maybe, for a way of telling Vim
"which mouse" is installed).
Hrm, yes, that could be a problem. I'm guessing the "conflict" has to do
with vim needing to actually signal to the terminal which style of mouse
code to send? (I had forgotten that this signal was necessary, which is
silly, since bad things would happen if it wasn't.)
Alright, then, looks like the only way forward is to fix terminfo, as
Bram has suggested. I just noticed that the screen info manual has a
section on termcap extensions that it supports, including a "XT" boolean
to indicate support for xterm mouse and OSC (with which I'm not
familiar). Perhaps that would be appropriate to prod the ncurses guys to
support...
Except, if it really is a conflict, I'm wondering how does elinks
manages to do it?
Maybe the way Vim does it, by checking the terminal name and version? I find
that in /dev/tty ($TERM=linux, gpm daemon running) 'ttymouse' is set to empty
while in konsole ($TERM=xterm) it is set to "xterm2". Both react to mouse
actions, but konsole seems not to report the mouse position except when a
button is pressed or released.
Best regards,
Tony.
--
If scientific reasoning were limited to the logical processes of
arithmetic, we should not get very far in our understanding of the
physical world. One might as well attempt to grasp the game of poker
entirely by the use of the mathematics of probability.
-- Vannevar Bush