summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2017-04-27 21:23:25 -0700
committerKevin McCarthy <kevin@8t8.us>2017-04-27 21:23:25 -0700
commitfe777f9348b1801d9ebc0d587f418eb523539965 (patch)
tree2dc3bb5ea62785660f36dc074b4b44baace0e0dc /curs_lib.c
parenta153f27e1df9b9f3a48012ed22d33cea1eb48530 (diff)
parent3fc8a24abfd9553f7ac2f37693079509947bc6e3 (diff)
merge stable
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/curs_lib.c b/curs_lib.c
index 952f1f1f..2e3400e8 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -908,6 +908,18 @@ void mutt_flush_macro_to_endcond (void)
}
}
+/* Normally, OP_END_COND should only be in the MacroEvent buffer.
+ * km_error_key() (ab)uses OP_END_COND as a barrier in the unget
+ * buffer, and calls this function to flush. */
+void mutt_flush_unget_to_endcond (void)
+{
+ while (UngetCount > 0)
+ {
+ if (UngetKeyEvents[--UngetCount].op == OP_END_COND)
+ return;
+ }
+}
+
void mutt_flushinp (void)
{
UngetCount = 0;