Hi, I noticed that it is pretty much impossible to interrupt Vim in GUI mode during lengthy shell operations and am wondering if this might be MacVim specific or not. This probably only applies to Unix variants of Vim since it deals with code inside os_unix.c.
This is what I did: go to the Vim 'src/' folder and type ":grep a *.c" (to the people using MacVim: don't try this at the moment, there is a bug which will cause MacVim to beachball -- I am working on fixing this right now). I then hit Ctrl-C to interrupt this operation (which will take a while...there are _many_ matches) but nothing happens. Whilst debugging this I noticed that in GUI mode it seems that Vim does little or no break checking during this operation. It ends up in a loop inside mch_call_shell() (starting at line 4358 in os_unix.c). At the end of this loop there is a check "if (got_int) break;" but I could not find where the actual break check is done inside this loop. If I add the statement "fast_breakcheck()" (so that the GUI gets a chance to check for key presses) before that if statement at the end of the loop I can properly interrupt the above test case. First of all, can somebody on a *nix machine (not Mac) test to see if they can break the above grep operation in GUI mode (_not_ in console mode, everything works fine there) and tell me if they are able to interrupt the grep operation. If so, I guess this is Mac specific but I'd still like to know when it checks for input (as I said, on the Mac this never happens). If not, I can provide the above one-liner patch (i.e. call fast_breakcheck()) to take care of this bug. Björn --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
