On Mi, 15 Apr 2020, Dominique Pellé wrote:

> Patrick Byrne <[email protected]> wrote:
> 
> > The vim docs say sgr should be set if xterm is v277 or later.
> > The xterm binary on my system is 295 which is later, but
> > I worry it is getting the version information from putty somehow.
> 
> It looks like vim's default value of 'ttymouse' is suboptimal
> when using the PuTTY terminal.

So putty does support sgr like mouse reporting? I do not use the mouse, 
but at least setting ttymouse=sgr worked in my putty version I use here 
locally (0.71). Oh I see putty is already at 0.73 (after years of no new 
release, need to update).

I guess this patch should enable it (totally untested):

diff --git a/src/term.c b/src/term.c
index ce935dcf4..fc0febba1 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4783,7 +4783,11 @@ not_enough:
                        // PuTTY sends 0;136;0
                        // vandyke SecureCRT sends 1;136;0
                        else if (version == 136 && arg[2] == 0)
+                       {
                            is_not_xterm = TRUE;
+                           set_option_value((char_u *)"ttym", 0L,
+                                                     (char_u *)"sgr", 0);
+                       }

                        // Konsole sends 0;115;0
                        else if (version == 115 && arg[0] == 0 && arg[2] == 0)


Best,
Christian
-- 
Wer die Menge unbedeutender ungenial(ischer) Bücher sieht, hält die
Menschen für noch unbedeutender.
                -- Jean Paul

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20200415131937.GX25035%40256bit.org.

Raspunde prin e-mail lui