Yasuhiro Matsumoto wrote: > > > On Wednesday, March 16, 2016 at 7:11:29 AM UTC+9, Bram Moolenaar wrote: > > > > Patch 7.4.1578 > > > > Problem: There is no way to invoke a function later or periodically. > > > > Solution: Add timer support. > > > > Files: src/eval.c, src/ex_cmds2.c, src/screen.c, src/ex_docmd.c, > > > > src/feature.h, src/gui.c, src/proto/eval.pro, > > > > src/proto/ex_cmds2.pro, src/proto/screen.pro, src/structs.h, > > > > src/version.c, src/testdir/test_alot.vim, > > > > src/testdir/test_timers.vim, runtime/doc/eval.txt > > > > > > win32 console doesn't work. maybe unix also need fix like this. > > > > > > diff --git a/src/os_win32.c b/src/os_win32.c > > > index d7b5634..88abb60 100644 > > > --- a/src/os_win32.c > > > +++ b/src/os_win32.c > > > @@ -1469,6 +1469,9 @@ WaitForChar(long msec) > > > #ifdef FEAT_CLIENTSERVER > > > serverProcessPendingMessages(); > > > #endif > > > +#ifdef FEAT_TIMERS > > > + check_due_timer(); > > > +#endif > > > > > > if (0 > > > #ifdef FEAT_MOUSE > > > > Can you explain why this is needed? There is a call to > > check_due_timer() a bit further down, is that not reached? > > > > The idea is that timers are not triggered when checking if a character > > is available (waittime zero), only when actually getting a character > > (waittime -1 or 'updatetime'). > > Ah, GUI worked as I expected (timer runs in regular interval), but CUI > doesn't. So I thought this is a bug. CUI doesn't runs in regular > interval as you said.
Can you find out why the check_due_timer() call isn't reached? I had tried this with vim.exe and it worked for me. Didn't try much though. Might depend on some setting. -- Time is money. Especially if you make clocks. /// Bram Moolenaar -- [email protected] -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
