Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/platform/win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2851,6 +2851,13 @@ fn check_external_change(hwnd: HWND, state: &mut AppState) -> Result<()> {
.get(index)
.and_then(|doc_tab| doc_tab.doc.stamp.clone());

if !path.exists() {
// File was deleted, renamed, or is on an unmounted drive. Leave the
// tab as-is rather than erroring on every focus regain; the user
// still has the in-memory content and can Save As if needed.
return Ok(());
}

if let Some(new_stamp) = document::check_stamp(&path, &stamp)? {
if prompt_reload(hwnd) {
reload_doc_from_path(hwnd, state, index, &path)?;
Expand Down