To: vim_dev@googlegroups.com Subject: Patch 9.0.0018 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0018 Problem: Going over the end of the typahead. Solution: Put a NUL after the typeahead. Files: src/term.c, src/testdir/test_mapping.vim *** ../vim-9.0.0017/src/term.c 2022-06-29 18:39:05.011841452 +0100 --- src/term.c 2022-07-01 16:34:49.298089973 +0100 *************** *** 5393,5398 **** --- 5393,5399 ---- if (*tp == ESC && !p_ek && (State & MODE_INSERT)) continue; + tp[len] = NUL; key_name[0] = NUL; // no key name found yet key_name[1] = NUL; // no key name found yet modifiers = 0; // no modifiers yet *** ../vim-9.0.0017/src/testdir/test_mapping.vim 2022-06-06 16:18:34.000000000 +0100 --- src/testdir/test_mapping.vim 2022-07-01 16:34:16.814128410 +0100 *************** *** 1715,1718 **** --- 1715,1728 ---- call delete('Xtest_map_after_timed_out_nop') endfunc + func Test_using_past_typeahead() + nnoremap :00 0 + exe "norm :set \x80\xfb0=0\" + exe "sil norm :0\x0f\\" + + exe "norm :set \x80\xfb0=\" + nunmap :00 + endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-9.0.0017/src/version.c 2022-07-01 15:26:09.298541278 +0100 --- src/version.c 2022-07-01 16:35:15.462058916 +0100 *************** *** 737,738 **** --- 737,740 ---- { /* Add new patch number below this line */ + /**/ + 18, /**/ -- Q. What happens to programmers when they die? A: MS-Windows programmers are reinstalled. C++ programmers become undefined, anyone who refers to them will die as well. Java programmers reincarnate after being garbage collected, unless they are in permgen, in which case they become zombies. Zimbu programmers leave a stack trace that tells us exactly where they died and how they got there. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///