Gary Johnson wrote:
> On 2017-11-03, Bram Moolenaar wrote:
> > Christian Brabandt wrote:
> >
> > > On Do, 02 Nov 2017, Gary Johnson wrote:
> > >
> > > > On 2017-11-02, Gary Johnson wrote:
> > > >
> > > > > So the funny behavior does seem related to the old addressing
> > > > > style, but why is it happening on an xterm-318 with 'ttymouse'
> > > > > automatically set to "sgr"?
> > > >
> > > > I tried finding the problem by bisecting the repository and found
> > > > that my build of 7.4.160 failed, too. That led me to discover that
> > > > my normal build was missing the mouse_sgr feature. I added
> > > > -DFEAT_MOUSE_SGR to CFLAGS and rebuilt and all is good.
> > > >
> > > > Thanks to James McCoy for directing my attention to SGR.
> > >
> > > So you could `:set ttymouse=sgr` but it didn't work because your vim was
> > > build without the FEAT_MOUSE_SGR feature? We should need an error
> > > message then, right? Perhaps the attached patch should be included.
> >
> > Hmm, this may lead to annoying error messages. Perhaps we can find
> > something in between: When ttymouse is set to an unspported value from a
> > script, set it to the nearest supported value. When manually setting it
> > to an unsupported value then give an error message. That way we don't
> > bother users who know it didn't work, and when someone manually sets
> > ttymouse to try out what works, he will see the error. Would that work?
>
> While I was investigating the problem, I started vim as
>
> $ vim -N -u NONE -i NONE
>
> and 'ttymouse' was set automatically to "sgr", presumably in
> response to the termresponse. Some sort of message in that
> situation would have been nice. Maybe. It only really matters,
> though, if the terminal width is greater than 223 and 'mouse' is
> set.
We can avoid this. There is an #ifdef for the code that sets 'ttymouse'
to "sgr", but it's using the wrong condition. Hmm, it also doesn't work
for running Vim in a terminal window.
> I suppose that if vim had automatically set 'ttymouse' to the
> nearest supported value (of "xterm2"?), that would have let me know
> that SGR wasn't being recognized; then giving me an error message if
> I tried to manually set it to "sgr" would have alerted me to the
> missing mouse_sgr feature.
>
> I don't know what the right solution is. This is an unusual
> problem. Solving it without a possibly annoying, in-your-face error
> message requires some awareness and knowledge of 'ttymouse'. Once
> you read and understand ":help 'ttymouse'", you don't need an error
> message to understand the problem and possible solutions.
>
> I think it would be nice, though, if the connection between the
> 'ttymouse' values and the required features was more explicit. That
> is, instead of the one paragraph stating
>
> The mouse handling must be enabled at compile time |+mouse_xterm|
> |+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
> |+mouse_sgr|.
>
> those features would be mentioned in the value descriptions, e.g.,
>
> sgr Mouse handling for the terminal that emits SGR-styled
> mouse reporting. The mouse works even in columns
> beyond 223. This option is backward compatible with
> "xterm2" because it can also decode "xterm2" style
> mouse codes. {only available when compiled with the
> |+mouse_sgr| feature}
--
So when I saw the post to comp.editors, I rushed over to the FTP site to
grab it. So I yank apart the tarball, light x candles, where x= the
vim version multiplied by the md5sum of the source divided by the MAC of
my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
wave a dead chicken over the hard drive, and summon the power of GNU GCC
with the magic words "make config ; make!".
[Jason Spence, compiling Vim 5.0]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.