Hi Christian! On Mi, 30 Sep 2015, Christian Robinson wrote:
> > On Sep 30, 2015, at 2:01 AM, Christian Brabandt <[email protected]> > > wrote: > >> On Fr, 04 Sep 2015, Christian J. Robinson wrote: > >> > >> If I set up the following autocmd: > >> > >> :autocmd FocusGained * :echomsg "here" > >> > >> Then from a command-line window do: > >> > >> vim --remote-send ":tabnew<cr>" > >> > >> I get the "here" message. This happens with a number of other > >> commands, including ":new", "i" (start insert mode), etc. This is > >> a problem for one of my scripts because it needs to be able to rely > >> on knowing when Vim actually has focus. > >> > >> It wouldn't be a problem in my use case if it immediately triggered > >> the FocusLost event after the --remote-send keystrokes, but it > >> doesn't. > > > > When exactly do you get this message? when the remote server has > > executed your command or when you switch to the server and it > > actually gains focus? > > > > I checked this here on windows with 7.4 and linux 7.4.861 and only > > see this message when actually switching focus, which seems correct. > > I get it immediately when the remote command is sent, before I > actually switch to the gVim window. > > This is on Windows 7. Hm, interesting. I don't see this with my usual vimrc setting, but when starting with -u NONE -N I suspect this is some gui redrawing causes somehow a FocusGained event. If I start the gvim server like this: gvim -u NONE -N --cmd ":set go=M" --noplugin --servername GVIM1 then it works again as expected. So try removing the menus and toolbars. Best, Christian -- Durch Frauen werden die Höhepunkte des Lebens bereichert und die Tiefpunkte vermehrt. -- Friedrich Wilhelm Nietzsche -- -- 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.
