From 5ff66f6bfa150ea295fdb6737873d65351eb193e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 30 Aug 2021 20:24:08 +0530 Subject: [PATCH] When reloading config also reload open-actions.conf --- kitty/boss.py | 2 ++ kitty/types.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/kitty/boss.py b/kitty/boss.py index 5f9c52eec..2f05599e1 100755 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -1648,6 +1648,8 @@ class Boss: if bad_lines: self.show_bad_config_lines(bad_lines) self.apply_new_options(opts) + from .open_actions import load_open_actions + load_open_actions.clear_cached() def safe_delete_temp_file(self, path: str) -> None: if is_path_in_temp_dir(path): diff --git a/kitty/types.py b/kitty/types.py index 6663c4943..61dcda1de 100644 --- a/kitty/types.py +++ b/kitty/types.py @@ -69,6 +69,7 @@ if TYPE_CHECKING: def __call__(self) -> _T: ... def set_override(self, val: _T) -> None: ... def clear_override(self) -> None: ... + def clear_cached(self) -> None: ... else: class RunOnce: @@ -84,6 +85,9 @@ else: self._cached_result = self.__wrapped__() return self._cached_result + def clear_cached(self): + self._cached_result = RunOnce + def set_override(self, val): self._override = val