To: vim_dev@googlegroups.com Subject: Patch 8.0.1128 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1128 Problem: Old xterm sends CTRL-X in response to t_RS. Solution: Only send t_RS for xterm 279 and later. Remove the workaround to ignore CTRL-X. Files: src/term.c *** ../vim-8.0.1127/src/term.c 2017-09-16 20:54:47.118560293 +0200 --- src/term.c 2017-09-19 20:44:06.518805856 +0200 *************** *** 4580,4588 **** is_not_xterm = TRUE; /* Only request the cursor style if t_SH and t_RS are ! * set. Not for Terminal.app, it can't handle t_RS, it * echoes the characters to the screen. */ if (rcs_status == STATUS_GET && !is_not_xterm && *T_CSH != NUL && *T_CRS != NUL) --- 4580,4591 ---- is_not_xterm = TRUE; /* Only request the cursor style if t_SH and t_RS are ! * set. Only supported properly by xterm since version ! * 279 (otherwise it returns 0x18). ! * Not for Terminal.app, it can't handle t_RS, it * echoes the characters to the screen. */ if (rcs_status == STATUS_GET + && version >= 279 && !is_not_xterm && *T_CSH != NUL && *T_CRS != NUL) *************** *** 4729,4739 **** key_name[0] = (int)KS_EXTRA; key_name[1] = (int)KE_IGNORE; slen = i + 1 + (tp[i] == ESC); - if (rcs_status == STATUS_SENT - && slen < len && tp[slen] == 0x18) - /* Some older xterm send 0x18 for the T_RS request, - * skip it here. */ - ++slen; # ifdef FEAT_EVAL set_vim_var_string(VV_TERMRGBRESP, tp, slen); # endif --- 4732,4737 ---- *************** *** 4782,4792 **** key_name[0] = (int)KS_EXTRA; key_name[1] = (int)KE_IGNORE; slen = i + 1 + (tp[i] == ESC); - if (rcs_status == STATUS_SENT - && slen < len && tp[slen] == 0x18) - /* Some older xterm send 0x18 for the T_RS request, - * skip it here. */ - ++slen; break; } } --- 4780,4785 ---- *************** *** 5470,5488 **** /* * Avoid computing the difference between mouse_time * and orig_mouse_time for the first click, as the ! * difference would be huge and would cause multiplication ! * overflow. */ timediff = p_mouset; } else { timediff = (mouse_time.tv_usec ! - orig_mouse_time.tv_usec) / 1000; if (timediff < 0) --orig_mouse_time.tv_sec; timediff += (mouse_time.tv_sec ! - orig_mouse_time.tv_sec) * 1000; } orig_mouse_time = mouse_time; if (mouse_code == orig_mouse_code --- 5463,5481 ---- /* * Avoid computing the difference between mouse_time * and orig_mouse_time for the first click, as the ! * difference would be huge and would cause ! * multiplication overflow. */ timediff = p_mouset; } else { timediff = (mouse_time.tv_usec ! - orig_mouse_time.tv_usec) / 1000; if (timediff < 0) --orig_mouse_time.tv_sec; timediff += (mouse_time.tv_sec ! - orig_mouse_time.tv_sec) * 1000; } orig_mouse_time = mouse_time; if (mouse_code == orig_mouse_code *** ../vim-8.0.1127/src/version.c 2017-09-18 21:50:42.720750714 +0200 --- src/version.c 2017-09-19 20:45:07.510428925 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1128, /**/ -- hundred-and-one symptoms of being an internet addict: 163. You go outside for the fresh air (at -30 degrees) but open the window first to hear new mail arrive. /// 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 ///