Commit 68d0e90f authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Reset all MonitorContext state on context removal.

Reset both the descriptor and changed flag when the current context is
removed.  Don't make this dependent on the context being valid or
being found by monitor_resolve(), in case the context was closed due
to some type of error condition.
parent d28fe351
Pipeline #24699329 passed with stages
in 16 minutes and 9 seconds
......@@ -414,12 +414,15 @@ int mutt_monitor_remove (BUFFY *buffy)
MONITORINFO info, info2;
if (!buffy)
MonitorContextDescriptor = -1;
MonitorContextChanged = 0;
if (monitor_resolve (&info, buffy) != RESOLVERES_OK_EXISTING)
return 2;
if (!buffy && (MonitorContextDescriptor == info.monitor->descr))
MonitorContextDescriptor = -1;
if (Context)
if (buffy)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment