[slim-vim] Highly recommended Vim patch

Brad Beveridge brad.beveridge at gmail.com
Fri Aug 18 20:37:39 CDT 2006


Hello all, I've been spending some time sorting out some network
problems with Slim-Vim.  Much of it boiled down to slight brokeness in
the original async patch.  Here is the changelog.
Fri Aug 18 18:01:21 PDT 2006  brad.beveridge at gmail.com
  * Corrected network_io flaws.
  * This patch addresses several flaws with the network_io callback scheme.
   1) Network callbacks had no way of telling Vim to redraw.  if_ecl
tried to call update_screen from within the callback, but this is
buggy - I have had Vim crash
   2) Callbacks used to be re-entrant (probably because of calling
update_screen).  It was possible to trigger a callback, and that
callback would call Vim code that could reprocess the network
callbacks, recalling the callback.  This is certainly not an intended
side effect.

  * Fix #1: callbacks now return true (non-zero) if they want Vim to
redraw (if_ecl assumes always redraw).  This flag effectively gets
passed up the stack to a point where it is actually safe to call
screen_update.
  * Fix #2: since Vim is single threaded, we simply have to worry
about trivial recursion, the callback function now has a static int
that tracts the nesting level, and returns if it is non-zero.

>From what I can see, this has vastly improved the stability of
Slim-Vim's callback operations - especially those that generate a lot
of buffer output.
Also, I have some slightly buggy patches that increase our buffer
write speed by a couple of orders of magnitude :)  When I squash the
last couple of bugs, I'll get them in.

So, please patch your Vim with this Darcs patch!  Larry, can you
please get this in the mainline ASAP.
>From now on, I am going to be extremely concerned with 3 areas of Slim-Vim
1) Incorrect display after an operation (garbled lines, etc)
2) Needing to press a key to update the display after an op.
3) Vim crashes, either to the console or the ECL repl.

If you see these - tell me!

Cheers
Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callback_fix.patch.gz
Type: application/x-gzip
Size: 2814 bytes
Desc: not available
Url : http://www.lispniks.com/pipermail/slim-vim/attachments/20060818/62d5a71e/callback_fix.patch.gz


More information about the slim-vim mailing list