diff --git a/src/session.rs b/src/session.rs index b9aae45..f826c17 100644 --- a/src/session.rs +++ b/src/session.rs @@ -90,6 +90,7 @@ impl PageState { if let Err(err) = page.load_file(file).await { tracing::error!("Failed to load file for page: {:?}", err); page.add_message_toast(&gettext("Failed to open file")); + return; } // Only restore selection once we have fully loaded the page's document.