Hello, below is code from raw_getbyte() / zle_main.c: case ZTM_FUNC: // MY DEBUG _F = fopen("/tmp/recursive.txt", "a+"); fprintf( _F, "queueing_enabled MARK[D] (%d)\n", queueing_enabled ); fclose(_F); while (firstnode(timedfns)) { Timedfn tfdat = (Timedfn)getdata(firstnode(timedfns)); /* * It's possible a previous function took * a long time to run (though it can't * call zle recursively), so recalculate * the time on each iteration. */ time_t now = time(NULL); if (tfdat->when > now) break; tfdat->func(); } // MY DEBUG _F = fopen("/tmp/recursive.txt", "a+"); fprintf( _F, "queueing_enabled MARK[C] (%d)\n", queueing_enabled ); fclose(_F); When not in .recursive-edit, log messages look like: zlecore() - queueing_enabled (1) getkeycmd() - queueing_enabled (1) getkeymapcmd() - queueing_enabled (1) getkeybuf() - queueing_enabled (1) getbyte() - queueing_enabled (1) raw_getbyte() - queueing_enabled (0) ... ... queueing_enabled MARK[2] (0) queueing_enabled MARK[D] (0) queueing_enabled MARK[C] (0) queueing_enabled MARK[B] (0) ... ... Timeout is reached every second (I do sched +1 and reschedule), the logs are produced at that rate. However, when I press Ctrl-C to invoke a .recursive-edit widget, then: recursiveedit() - queueing_enabled (1) zlecore() - queueing_enabled (1) getkeycmd() - queueing_enabled (1) getkeymapcmd() - queueing_enabled (1) getkeybuf() - queueing_enabled (1) getbyte() - queueing_enabled (1) raw_getbyte() - queueing_enabled (0) ... ... queueing_enabled MARK[2] (0) queueing_enabled MARK[D] (0) queueing_enabled MARK[C] (1) queueing_enabled MARK[B] (1) ... ... queueing_enabled MARK[2] (1) queueing_enabled MARK[D] (1) queueing_enabled MARK[C] (2) queueing_enabled MARK[B] (2) ... ... queueing_enabled MARK[2] (2) queueing_enabled MARK[D] (2) queueing_enabled MARK[C] (3) queueing_enabled MARK[B] (3) ... ... This causes Ctrl-C signal to be queued when in .recursive-edit, what results in need of multiple Ctrl-C presses (errflag is set in middle of sequence of checks of it's value and raw_getbytes() executes in weird way). Also, errflag is set at random place after select() in raw_getbyte(), and as Bart says, this prevents scheduled function to execute at all, thus chain of rescheduling breaks. For completeness I attach 10 context lines diff with the debug messages, but the crucial two are pasted above. To see the efect only this has to be ran: wid() { zle .recursive-edit; } zle -N wid bindkey '^T' wid fun() { sched +1 fun; } fun ^T PS. Because of problems with ML (maybe they're over?) I send also to Bart and Peter. Best regards, Sebastian Gniazdowski