aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLulu <git@src.lu>2025-10-16 07:37:33 +0100
committerGitHub <noreply@github.com>2025-10-16 06:37:33 +0000
commita513d137791b98a082eb4bf591b1fd5db7a942cb (patch)
tree9d6c44623a896ac640b0b18c31b4ff3d57920fc0
parent48e19ec3cb03f063710b24abf7a1d9ad753a7754 (diff)
downloadr-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.md1
-rw-r--r--alacritty/src/config/monitor.rs6
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(_)