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
10 changes: 6 additions & 4 deletions crates/edit/src/bin/edit/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ fn run() -> apperr::Result<()> {
localization::init();

let mut state = State::new()?;

// Load settings so user file associations are ready when opening files passed as args
if let Err(err) = Settings::reload() {
state.add_error(err);
}

if handle_args(&mut state)? {
return Ok(());
}

handle_stdin(&mut state)?;

if let Err(err) = Settings::reload() {
state.add_error(err);
}

// Switch the terminal to raw mode which prevents the user from pressing Ctrl+C.
// `handle_args` may want to print a help message (must not fail),
// and reads files (may hang; should be cancelable with Ctrl+C).
Expand Down
Loading