Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/file_watcher.rs')
| -rw-r--r-- | helix-core/src/file_watcher.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-core/src/file_watcher.rs b/helix-core/src/file_watcher.rs index 9e49bab9..f0101368 100644 --- a/helix-core/src/file_watcher.rs +++ b/helix-core/src/file_watcher.rs @@ -51,7 +51,7 @@ impl Default for Config { fn default() -> Self { Config { enable: true, - watch_vcs: false, + watch_vcs: true, require_workspace: true, hidden: true, ignore: true, @@ -167,7 +167,10 @@ impl Watcher { return; } let (workspace, _) = helix_loader::find_workspace(); - self.roots.push((root.clone(), 1)); + if root.starts_with(&workspace) { + return; + } + self.roots.insert(i, (root.clone(), 1)); self.filter = Arc::new(WatchFilter::new( &self.config, &workspace, |