Jacob Niehus wrote: > > > > > I narrowed it down to the point I can reproduce it with no > > > > > configuration file. Apparently keys typed while a shell command is > > > > > executing are drawn on screen immediately, then drawn again after the > > > > > command finishes. Also I should have mentioned before that this is not > > > > > Cygwin-specific; it just was more apparent on Cygwin because Cygwin is > > > > > slow, relatively speaking. > > > > > > > > > > vim -u NONE -i NONE -c 'autocmd InsertCharPre * call system("sleep > > > > > 1")' > > > > > > > > Sounds like echo is on while executing the system command, but the typed > > > > character is not consumed by the external command. > > > > > > > > Switching echo off may have undesired side effects, e.g. for a command > > > > that asks for confirmation. > > > > > > > > Perhaps we could detect we get a key right after system() and redraw. > > > > That will cause flicker though. > > > > > > After some more digging, I gather you are referring to settmode(), > > > where the options are TMODE_COOK, TMODE_SLEEP, and TMODE_RAW. > > > TMODE_COOK allows directly typing characters on screen even while I > > > have Vim stopped at a breakpoint in gdb. Using TMODE_SLEEP in > > > mch_call_shell() in unix.c instead of TMODE_COOK makes the problem go > > > away and system() commands still work, but I don't know what the side > > > effects would be. I'm having a hard time looking up cooked shells > > > without finding articles about seafood :) > > > > I'll ask a colleague to fix that :-). > > > > The command executed with system() would normally read the text from > > stdin. But it's possible to open stderr for input and read text there, > > e.g. for a prompt. I can't think of a good example of a command that > > does this. > > How about an optional argument for the system() command to disable echo?
That most people would not care about unless they figure out the problem like you did? Not a nice solution. -- How To Keep A Healthy Level Of Insanity: 2. Page yourself over the intercom. Don't disguise your voice. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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. For more options, visit https://groups.google.com/d/optout.