It's not easy to reproduce the problem I've found. You need to use some
kind of GTK input method, tested ones are fcitx and ibus.

1. start gvim, enter insert mode once (for ibus; fcitx doesn't need
   this);
2. enter commandline mode and optionally type something, then switch to
   another application and switch back;
3. the cursor is placed in the window, not the commandline. However,
   continuing to type will bring it back.

This doesn't happen if I use XIM or none at all. The attached patch
fixed this.

-- 
Best regards,
lilydjwg

Linux Vim Python 我的博客:
http://lilydjwg.is-programmer.com/
--
A: Because it obfuscates the reading.
Q: Why is top posting so bad?

-- 
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
diff --git a/src/mbyte.c b/src/mbyte.c
index 54bb285..b852706 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4696,7 +4696,8 @@ im_show_info(void)
     vgetc_busy = TRUE;
     showmode();
     vgetc_busy = old_vgetc_busy;
-    setcursor();
+    if ((State & NORMAL) || (State & INSERT))
+       setcursor();
     out_flush();
 }
 

Raspunde prin e-mail lui