Hi,

On Thu, Jan 19, 2017 at 8:39 AM, Zhen-Huan (Kenny) Hu
<[email protected]> wrote:
> Please make mode() return i_CTRL-X sub mode. Currently there seems to be no
> way to determine this. It would be very helpful for writing completion
> plugins.
>

Can you try the attached diff? The mode() function will return
'x' in i_CTRL-X sub mode. Need to test this under different insert mode
conditions where CTRL-X can be pressed.

- Yegappan

-- 
-- 
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.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 4b6bfaa..69a36e0 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -7757,6 +7757,11 @@ f_mode(typval_T *argvars, typval_T *rettv)
        buf[0] = '!';
     else if (State & INSERT)
     {
+#ifdef FEAT_INS_EXPAND
+       if (ctrl_x_mode != 0)
+           buf[0] = 'x';
+       else
+#endif
 #ifdef FEAT_VREPLACE
        if (State & VREPLACE_FLAG)
        {

Raspunde prin e-mail lui