diff options
| author | Lulu <git@src.lu> | 2025-10-16 07:37:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-16 06:37:33 +0000 |
| commit | a513d137791b98a082eb4bf591b1fd5db7a942cb (patch) | |
| tree | 9d6c44623a896ac640b0b18c31b4ff3d57920fc0 | |
| parent | 48e19ec3cb03f063710b24abf7a1d9ad753a7754 (diff) | |
| download | r-alacritty-a513d137791b98a082eb4bf591b1fd5db7a942cb.tar.gz r-alacritty-a513d137791b98a082eb4bf591b1fd5db7a942cb.tar.bz2 r-alacritty-a513d137791b98a082eb4bf591b1fd5db7a942cb.zip | |
Ignore when config file is moved
As this is practically the same as deleting the file it should be
treated the same and ignored.
Moving a file from somewhere to the config file is not ignored and the config
will reload as normal.
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | alacritty/src/config/monitor.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 368205e8..378cc735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its ### Fixed - Slowdowns over time on macOS 26 +- Brief error popup when saving the config file with some editors ## 0.16.0 diff --git a/alacritty/src/config/monitor.rs b/alacritty/src/config/monitor.rs index feda3f25..476b41dd 100644 --- a/alacritty/src/config/monitor.rs +++ b/alacritty/src/config/monitor.rs @@ -6,6 +6,7 @@ use std::thread::JoinHandle; use std::time::{Duration, Instant}; use log::{debug, error, warn}; +use notify::event::{ModifyKind, RenameMode}; use notify::{ Config, Error as NotifyError, Event as NotifyEvent, EventKind, RecommendedWatcher, RecursiveMode, Watcher, @@ -112,6 +113,11 @@ impl ConfigMonitor { match event { Ok(Ok(event)) => match event.kind { EventKind::Other if event.info() == Some("shutdown") => break, + // Ignore when config file is moved as it's equivalent to deletion. + // Some editors trigger this as they move the file as part of saving. + EventKind::Modify(ModifyKind::Name( + RenameMode::From | RenameMode::Both, + )) => (), EventKind::Any | EventKind::Create(_) | EventKind::Modify(_) |