On 6/25/17 12:03 AM, Bram Moolenaar wrote:
Patch 8.0.0670
Problem: Can't use input() in a timer callback. (Cosmin Popescu)
Solution: Reset vgetc_busy and set timer_busy. (Ozaki Kiichi, closes #1790,
closes #1129)
Files: src/evalfunc.c, src/ex_cmds2.c, src/globals.h,
src/testdir/test_timers.vim
After this patch, mingw (gcc 7.1.0, 64bit) reports this error if
FEAT_RELTIME is not defined:
...
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s evalfunc.c -o gobjnative/evalfunc.o
evalfunc.c: In function 'f_feedkeys':
evalfunc.c:3194:24: error: 'timer_busy' undeclared (first use in this
function); did you mean 'time_push'?
if (vgetc_busy || timer_busy)
^~~~~~~~~~
time_push
evalfunc.c:3194:24: note: each undeclared identifier is reported only
once for each function it appears in
Make_cyg_ming.mak:887: recipe for target 'gobjnative/evalfunc.o' failed
make: *** [gobjnative/evalfunc.o] Error 1
make: *** Waiting for unfinished jobs....
...
Disabling FEAT_RELTIME in turn disables FEAT_TIMERS which causes two
variables (did_add_timer and timer_busy) to not be defined in globals.h
(line 1660).
The attached patch seems to fix it. Please check.
Cheers
John
--
--
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.
--- evalfunc_old.c 2017-06-25 06:05:25.845778400 +1000
+++ evalfunc.c 2017-06-25 07:55:36.350966400 +1000
@@ -3191,7 +3191,11 @@
ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
insert ? 0 : typebuf.tb_len, !typed, FALSE);
vim_free(keys_esc);
- if (vgetc_busy || timer_busy)
+ if (vgetc_busy
+#ifdef FEAT_TIMERS
+ || timer_busy
+#endif
+)
typebuf_was_filled = TRUE;
if (execute)
{