> OK, so the whole sequence is triggered by the balloon eval
> functionality.  This happens in check_due_timer().  That's a fairly
> normal way a callback is invoked, in this case evaluating 'balloonexpr'.

Ok, thanks.

> You can see in line 409:
>   0.181045 : safe state reset
>
> That's why it stops triggering SafeStateAgain.  This is after a call to
> s:define(), that is that doing?  Somehow it doesn't go back to the main
> loop to check the state.

All callbacks we make from Vim -> govim use ch_evalexpr, for
autocommands, commands, functions, listener_add callbacks etc. That is
they all block. This makes reasoning about things much easier. If
anything needs to happen async we make that decision within govim.

Similarly for calls from govim -> Vim we block on the govim side; we
then use ch_sendexpr to reply from Vim with an [error(, result)]
array:

https://github.com/govim/govim/blob/e8054412bdbc5c2fd232a56fdc79ca4fc6082312/plugin/govim.vim#L221

So lines 408-410:

  0.180945 on 0: Invoking channel callback <SNR>17_define
  0.181045 : safe state reset
  0.181146 SEND on 0(sock): '[49,["callback",45,[""]]]

is the "response" to govim from the call from line 404:

  0.180915 RECV on 0(sock): '[0,[45,"ex","call
feedkeys(\"\\\u003cMouseMove\u003e\\\u003cIgnore\u003e\", \"xt\")"]]

(you can see we also have an ID in there)

Hopefully that help to clarify things?

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CACoUkn4rzyFYx6vkjmQKdSXzu6GywzPYqAZM1A%3DcDDhY9A3HaQ%40mail.gmail.com.

Raspunde prin e-mail lui