summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-04-22 15:17:40 +0200
committerBram Moolenaar <Bram@vim.org>2017-04-22 15:17:40 +0200
commit7a85b0f028e0960ba70650ab462a9b6cca32139d (patch)
tree1d851abf29ec10667b1d45cd668bb333b9da9893
parent97db5541a65e4614f8753af27996c204946061a9 (diff)
downloadvim-git-7a85b0f028e0960ba70650ab462a9b6cca32139d.tar.gz
patch 8.0.0578: :simalt on MS-Windows does not work properlyv8.0.0578
Problem: :simalt on MS-Windows does not work properly. Solution: Put something in the typeahead buffer. (Christian Brabandt)
-rw-r--r--src/gui_w32.c16
-rw-r--r--src/version.c2
2 files changed, 17 insertions, 1 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index fc566abee..52db8f4a3 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -2627,7 +2627,9 @@ gui_mch_set_curtab(int nr)
void
ex_simalt(exarg_T *eap)
{
- char_u *keys = eap->arg;
+ char_u *keys = eap->arg;
+ int fill_typebuf = FALSE;
+ char_u key_name[4];
PostMessage(s_hwnd, WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)0);
while (*keys)
@@ -2636,6 +2638,18 @@ ex_simalt(exarg_T *eap)
*keys = ' '; /* for showing system menu */
PostMessage(s_hwnd, WM_CHAR, (WPARAM)*keys, (LPARAM)0);
keys++;
+ fill_typebuf = TRUE;
+ }
+ if (fill_typebuf)
+ {
+ /* Put something in the typeahead buffer so that the message will get
+ * processed. */
+ key_name[0] = K_SPECIAL;
+ key_name[1] = KS_EXTRA;
+ key_name[2] = KE_IGNORE;
+ key_name[3] = NUL;
+ typebuf_was_filled = TRUE;
+ (void)ins_typebuf(key_name, REMAP_NONE, 0, TRUE, FALSE);
}
}
diff --git a/src/version.c b/src/version.c
index 663717b60..656a7ccf5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 578,
+/**/
577,
/**/
576,