Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Where to start debugging zle recursive-edit? / Ctrl-C



On Sep 30,  3:30pm, Sebastian Gniazdowski wrote:
}
} So, the linked list doesn't have any elements, and calc_timeout()
} exits with ZTM_NONE instead of ZTM_FUNC

If I recall correctly how this is architected ...

This must mean that you are interrupting the scheduled function itself,
before it has a chance to execute "sched" and reset its timer.

Because you are in recursive-edit, interrupting does not go all they
way back to the top-level prompt where the precmd hook would restore
the timer, so it remains unscheduled until the current zle session
is done and precmd runs again.

You may need to find a more aggressive place to reset the timer, such
as in the zle-line-pre-redraw hook, or else create a wrapper widget
for recursive-edit.

Either way you'd want to examine $zle_scheduled_events to see if the
timer is still pending, before scheduling it again.

Or possibly you could switch from doing this with a timer scheduled
function to using a "zle -F" handler function.



Messages sorted by: Reverse Date, Date, Thread, Author