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. 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} Regards, Gary -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.