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

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

On Sep 23,  6:26pm, Sebastian Gniazdowski wrote:
} I use a POSTDISPLAY interface for Ctrl-R, that works inside
} .zle-recursive edit. Occurring problems with Ctrl-C every day.
} [...] Funny that it became much more intensive after adding
} few custom keymap's bindings for left/right cursors

This probably means that the ^C is arriving while zle is waiting
to see if a binding has multiple "keystrokes" before determining
what widget to call.

Does emacs mode vs. viins or vicmd matter?  Does (un)setopt multibyte?

} Also one user reports that Ctrl-C crashes Zsh.

If this is with the latest build from git, it might be related to
the recently-introduced signal-handling problem with functions that
Daniel and I have been discussing elsewhere.

} Would add a debug print somewhere and observe, then extend the
} debugging. But where?

You're probably interested in getbyte() in zle_main.c, but you might
also attach with a debugger and put a breakpoint in zhandler so you
can get a stack trace of where the handler is being called [if it is].
(Starting the debugger first and running zsh inside it won't work as
well because the debugger itself will trap the signals).

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