From c85fce703d698391d47f58336c0b0a8ecc109aaa Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 21 Apr 2022 06:34:01 -0700 Subject: [PATCH] config: avoid watching and reloading for home dir changes refs: #1697 refs: https://github.com/wez/wezterm/issues/1895 --- config/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/src/lib.rs b/config/src/lib.rs index 95e331275..7932c8654 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -484,7 +484,13 @@ impl ConfigInner { // Let's also watch the parent directory for folks that do // things with symlinks: if let Some(parent) = path.parent() { - watch_paths.push(parent.to_path_buf()); + // But avoid watching the home dir itself, so that we + // don't keep reloading every time something in the + // home dir changes! + // + if parent != &*HOME_DIR { + watch_paths.push(parent.to_path_buf()); + } } watch_paths.push(path); }