To: vim_dev@googlegroups.com Subject: Patch 8.2.0647 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0647 Problem: MS-Windows: repeat count for events was not used. Solution: Check the repeat count. (Nobuhiro Takasaki, closes #5989) Files: src/os_win32.c *** ../vim-8.2.0646/src/os_win32.c 2020-04-19 14:02:22.427687032 +0200 --- src/os_win32.c 2020-04-26 18:58:28.187688659 +0200 *************** *** 307,312 **** --- 307,313 ---- int head; int tail; int i; + static INPUT_RECORD s_irPseudo; if (nLength == -2) return (s_dwMax > 0) ? TRUE : FALSE; *************** *** 354,359 **** --- 355,373 ---- } } + if (s_irCache[s_dwIndex].EventType == KEY_EVENT) + { + if (s_irCache[s_dwIndex].Event.KeyEvent.wRepeatCount > 1) + { + s_irPseudo = s_irCache[s_dwIndex]; + s_irPseudo.Event.KeyEvent.wRepeatCount = 1; + s_irCache[s_dwIndex].Event.KeyEvent.wRepeatCount--; + *lpBuffer = s_irPseudo; + *lpEvents = 1; + return TRUE; + } + } + *lpBuffer = s_irCache[s_dwIndex]; if (!(nLength == -1 || nLength == -2) && ++s_dwIndex >= s_dwMax) s_dwMax = 0; *** ../vim-8.2.0646/src/version.c 2020-04-26 16:52:45.670780537 +0200 --- src/version.c 2020-04-26 18:59:42.059346622 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 647, /**/ -- Q: What is the difference between open-source and commercial software? A: If you have a problem with commercial software you can call a phone number and they will tell you it might be solved in a future version. For open-source software there isn't a phone number to call, but you get the solution within a day. /// 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 ///