To: vim_dev@googlegroups.com Subject: Patch 8.0.1258 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1258 Problem: 'ttymouse' is set to "sgr" even though it's not supported. (Gary Johnson) Solution: Adjust #ifdef Files: src/term.c *** ../vim-8.0.1257/src/term.c 2017-10-28 21:08:38.991456926 +0200 --- src/term.c 2017-11-04 15:06:16.711411325 +0100 *************** *** 4547,4568 **** { int need_flush = FALSE; - /* Only set 'ttymouse' automatically if it was not set - * by the user already. */ - if (!option_was_set((char_u *)"ttym")) - { - # ifdef TTYM_SGR - if (version >= 277) - set_option_value((char_u *)"ttym", 0L, - (char_u *)"sgr", 0); - else - # endif - /* if xterm version >= 95 use mouse dragging */ - if (version >= 95) - set_option_value((char_u *)"ttym", 0L, - (char_u *)"xterm2", 0); - } - /* if xterm version >= 141 try to get termcap codes */ if (version >= 141) { --- 4547,4552 ---- *************** *** 4581,4586 **** --- 4565,4592 ---- * 256, libvterm supports even more. */ if (mch_getenv((char_u *)"COLORS") == NULL) may_adjust_color_count(256); + # ifdef FEAT_MOUSE_SGR + /* Libvterm can handle SGR mouse reporting. */ + if (!option_was_set((char_u *)"ttym")) + set_option_value((char_u *)"ttym", 0L, + (char_u *)"sgr", 0); + # endif + } + + /* Only set 'ttymouse' automatically if it was not set + * by the user already. */ + if (!option_was_set((char_u *)"ttym")) + { + # ifdef FEAT_MOUSE_SGR + if (version >= 277) + set_option_value((char_u *)"ttym", 0L, + (char_u *)"sgr", 0); + else + # endif + /* if xterm version >= 95 use mouse dragging */ + if (version >= 95) + set_option_value((char_u *)"ttym", 0L, + (char_u *)"xterm2", 0); } /* Detect terminals that set $TERM to something like *** ../vim-8.0.1257/src/version.c 2017-11-02 23:11:17.953118267 +0100 --- src/version.c 2017-11-04 14:56:55.968278543 +0100 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1258, /**/ -- Zen Microsystems: we're the om in .commmmmmmmm /// 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 ///