Christian Brabandt wrote:

> On Do, 20 Apr 2017, Bram Moolenaar wrote:
> 
> > How about using K_IGNORE instead?  In the input buffer that's K_SPECIAL
> > KS_EXTRA KE_IGNORE (three bytes).
> 
> Thanks that helps. How about this patch then:
> 
> diff --git a/src/gui_w32.c b/src/gui_w32.c
> index fc566abee..4d9eaab92 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[3];
> 
>      PostMessage(s_hwnd, WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)0);
>      while (*keys)
> @@ -2636,6 +2638,15 @@ 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)
> +    {
> +       key_name[0] = K_SPECIAL;
> +       key_name[1] = KS_EXTRA;
> +       key_name[2] = KE_IGNORE;
> +       typebuf_was_filled = TRUE;
> +       (void)ins_typebuf(key_name, REMAP_NONE, 0, TRUE, FALSE);
>      }
>  }
> 
> 
> In fact, even simply setting typebuf_was_filled seems to be enough. 
> However, as I don't know what the input typebuf will then look like, I 
> added the K_IGNORE as suggested.

Not sure if that makes a difference, would depend on from where
ex_simalt() was called.

We do need to append a NUL to key_name!

-- 
MARTHA'S WAY: Don't throw out all that leftover wine. Freeze into ice cubes
              for future use in casseroles and sauces.
MY WAY:       What leftover wine?

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui