comparison src/gui_w32.c @ 11386:e2b34123c7dc v8.0.0578

patch 8.0.0578: :simalt on MS-Windows does not work properly commit https://github.com/vim/vim/commit/7a85b0f028e0960ba70650ab462a9b6cca32139d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 22 15:17:40 2017 +0200 patch 8.0.0578: :simalt on MS-Windows does not work properly Problem: :simalt on MS-Windows does not work properly. Solution: Put something in the typeahead buffer. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Sat, 22 Apr 2017 15:30:04 +0200
parents f4ea50924c6d
children db21cc7b40f0
comparison
equal deleted inserted replaced
11385:47c1375e7c24 11386:e2b34123c7dc
2625 * ":simalt" command. 2625 * ":simalt" command.
2626 */ 2626 */
2627 void 2627 void
2628 ex_simalt(exarg_T *eap) 2628 ex_simalt(exarg_T *eap)
2629 { 2629 {
2630 char_u *keys = eap->arg; 2630 char_u *keys = eap->arg;
2631 int fill_typebuf = FALSE;
2632 char_u key_name[4];
2631 2633
2632 PostMessage(s_hwnd, WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)0); 2634 PostMessage(s_hwnd, WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)0);
2633 while (*keys) 2635 while (*keys)
2634 { 2636 {
2635 if (*keys == '~') 2637 if (*keys == '~')
2636 *keys = ' '; /* for showing system menu */ 2638 *keys = ' '; /* for showing system menu */
2637 PostMessage(s_hwnd, WM_CHAR, (WPARAM)*keys, (LPARAM)0); 2639 PostMessage(s_hwnd, WM_CHAR, (WPARAM)*keys, (LPARAM)0);
2638 keys++; 2640 keys++;
2641 fill_typebuf = TRUE;
2642 }
2643 if (fill_typebuf)
2644 {
2645 /* Put something in the typeahead buffer so that the message will get
2646 * processed. */
2647 key_name[0] = K_SPECIAL;
2648 key_name[1] = KS_EXTRA;
2649 key_name[2] = KE_IGNORE;
2650 key_name[3] = NUL;
2651 typebuf_was_filled = TRUE;
2652 (void)ins_typebuf(key_name, REMAP_NONE, 0, TRUE, FALSE);
2639 } 2653 }
2640 } 2654 }
2641 2655
2642 /* 2656 /*
2643 * Create the find & replace dialogs. 2657 * Create the find & replace dialogs.