To: vim_dev@googlegroups.com Subject: Patch 8.2.0588 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0588 Problem: Putty does not use "sgr" 'ttymouse' by default. Solution: Make "sgr" the default for Putty. (Christian Brabandt, closes #5942) Files: src/term.c *** ../vim-8.2.0587/src/term.c 2020-04-12 15:10:36.618312729 +0200 --- src/term.c 2020-04-17 16:40:10.894671093 +0200 *************** *** 4762,4776 **** || (is_screen && arg[1] >= 40700)) set_option_value((char_u *)"ttym", 0L, (char_u *)"sgr", 0); ! // if xterm version >= 95 use mouse dragging else if (version >= 95) set_option_value((char_u *)"ttym", 0L, (char_u *)"xterm2", 0); } // Detect terminals that set $TERM to something like ! // "xterm-256colors" but are not fully xterm ! // compatible. // Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0. // xfce4-terminal sends 1;2802;0. --- 4762,4775 ---- || (is_screen && arg[1] >= 40700)) set_option_value((char_u *)"ttym", 0L, (char_u *)"sgr", 0); ! // For xterm version >= 95 mouse dragging works. else if (version >= 95) set_option_value((char_u *)"ttym", 0L, (char_u *)"xterm2", 0); } // Detect terminals that set $TERM to something like ! // "xterm-256color" but are not fully xterm compatible. // Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0. // xfce4-terminal sends 1;2802;0. *************** *** 4783,4790 **** --- 4782,4799 ---- // PuTTY sends 0;136;0 // vandyke SecureCRT sends 1;136;0 else if (version == 136 && arg[2] == 0) + { is_not_xterm = TRUE; + // PuTTY supports sgr-like mouse reporting, but + // only set 'ttymouse' if it was not set by the + // user already. + if (arg[0] == 0 + && !option_was_set((char_u *)"ttym")) + 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) is_not_xterm = TRUE; *** ../vim-8.2.0587/src/version.c 2020-04-16 23:01:46.958088087 +0200 --- src/version.c 2020-04-17 16:36:44.203202844 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 588, /**/ -- This computer is so slow, it takes forever to execute and endless loop! /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///