Avoid looping if window:set_config_overrides doesn't change the config

Assuming that the window config reloaded hook doesn't actually change
anything, this will avoid a cycle where we keep triggering the hook
over and over.
This commit is contained in:
Wez Furlong committed 2021-12-01 08:45:12 -07:00
1 parent ab8907e735
commit 232b220d08
1 file changed
+4 -2
+4 -2
View File
@@ -810,8 +810,10 @@ impl TermWindow {
.context("send GetConfigOverrides response")?;
}
TermWindowNotif::SetConfigOverrides(value) => {
self.config_overrides = value;
self.config_was_reloaded();
if value != self.config_overrides {
self.config_overrides = value;
self.config_was_reloaded();
}
}
TermWindowNotif::CancelOverlayForPane(pane_id) => {
self.cancel_overlay_for_pane(pane_id);