diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-04-16 11:48:23 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-04-16 11:48:23 +0300 |
commit | a6b5394086260c262e393dd113057916fd14134b (patch) | |
tree | 1687520d5d57f7fe269483c78b85c7be429b52d3 /contrib | |
parent | 030e0f5859698638a33d3a34c0659871d1dc7333 (diff) | |
download | sciteco-a6b5394086260c262e393dd113057916fd14134b.tar.gz |
fixed interruptions of commands with string arguments in interactive mode
* In order to provoke this bug, there must be a loop with a string command.
For instance <Ifoobar^J$>.
When interrupting this loop, ctx->expectstring.insert_len might end up > 0.
This breaks an optimization that avoids undo tokens for insert_len since it
is usually reset to 0 after every keypress.
Once you rubout everything and retype `I`, you can crash SciTECO.
* I am not sure if this solution is ideal.
An alternative might be adding teco_state_expectstring_initial(),
but we would have to chain to it from some child states that have their
own initial() callback.
Of course, we could also simply teco_undo_gsize(insert_len) at the cost
of undo tokens.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions