2009/2/5 Bram Moolenaar:
>
> If I do  ":!cat"  then typing CTRL-C does appear to work.  Perhaps it's
> the flood of output to the screen that stops the CTRL-C check?  No time
> to investigate further right now.

Yes, this seems to be the problem.  The difference between ":!cat" and
":grep a *.c" is that the former produces no output whereas the latter
does and consequently Vim gets stuck in the loop on line 4368
(os_unix.c) starting with

  while (RealWaitForChar(fromshell_fd, 10L, NULL))

This loop is where I added the break check since there are no other
checks for ctrl-c here.  Only when this loop exits is ui_inchar()
called and in the case of ":grep a *.c" this loop is iterated _many_
times (up to 60000) before breaking out to call ui_inchar() again.

Dominique: It is strange that my patch does not fix the problem for
you...maybe fast_breakcheck() doesn't call gui_mch_update() often
enough on your system (although that seems unlikely judging from the
amount of times this loop iterates as I mentioned above)?  It does
take care of the problem on my machine (Mac OS X 10.5.6, Vim 7.2
patches 1-102, with MacVim GUI).

Anyway, I don't know what the proper way to fix this problem is then
seeing as it's not working for Dominique.  But somehow we have to
ensure that this problematic loop doesn't get stuck for "too long"
(whatever metric we may use to measure that) or that we check for
ctrl-c explicitly during the loop (which was what my patch was
supposed to do).  Any ideas?

Björn

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui