To: vim_dev@googlegroups.com Subject: Patch 8.0.1371 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1371 Problem: Shift-Insert doesn't always work in MS-Windows console. Solution: Handle K_NUL differently if the second character is more than one byte. (Yasuhiro Matsumoto, closes #2381) Files: src/os_win32.c *** ../vim-8.0.1370/src/os_win32.c 2017-11-28 20:06:06.913326460 +0100 --- src/os_win32.c 2017-12-05 15:02:38.891801734 +0100 *************** *** 1816,1824 **** typeahead[typeaheadlen] = c; if (ch2 != NUL) { ! typeahead[typeaheadlen + n] = 3; ! typeahead[typeaheadlen + n + 1] = (char_u)ch2; ! n += 2; } /* Use the ALT key to set the 8th bit of the character --- 1816,1833 ---- typeahead[typeaheadlen] = c; if (ch2 != NUL) { ! if (c == K_NUL && (ch2 & 0xff00) != 0) ! { ! /* fAnsiKey with modifier keys */ ! typeahead[typeaheadlen + n] = (char_u)ch2; ! n++; ! } ! else ! { ! typeahead[typeaheadlen + n] = 3; ! typeahead[typeaheadlen + n + 1] = (char_u)ch2; ! n += 2; ! } } /* Use the ALT key to set the 8th bit of the character *** ../vim-8.0.1370/src/version.c 2017-12-05 14:04:23.786551596 +0100 --- src/version.c 2017-12-05 15:04:09.335301237 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1371, /**/ -- hundred-and-one symptoms of being an internet addict: 83. Batteries in the TV remote now last for months. /// 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 ///