Closed xeruf closed 1 month ago
n: RepeatCount, positive: bool
are used in emacs mode:
https://github.com/kkawakam/rustyline/blob/db7209d9db5032a5ee566a2230565867d4c705af/src/keymap.rs#L523
but are irrelevant here.
You can find information about the current line here: https://docs.rs/rustyline/latest/rustyline/struct.EventContext.html#method.line
There is an example here: https://github.com/kkawakam/rustyline/blob/db7209d9db5032a5ee566a2230565867d4c705af/examples/custom_key_bindings.rs#L74-L83
When I receive an
Interrupted
Err, I do not get any information about the current line. So I wrote aConditionalEventHandler
for Ctrl-C - but none of the parameters seems to provide any information about the content in the line so far. And what the parameterpositive
means is entirely unclear to me.This is what I have, but the event is always the Ctrl-C event so Interrupt is never triggered: