File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,15 +98,18 @@ impl App {
9898 let mut tui = terminal. tui . lock ( ) . await ;
9999 tui. exit ( ) ?;
100100 let editor = std:: env:: var ( "EDITOR" ) . unwrap_or_else ( |_| "nano" . to_string ( ) ) ;
101- match Command :: new ( editor) . arg ( path) . status ( ) {
101+ match Command :: new ( & editor) . arg ( path) . status ( ) {
102102 Ok ( _) => {
103103 tui. enter ( ) ?;
104104 tui. clear ( ) ?;
105105 event = EventHandler :: new ( self . home . clone ( ) , action_tx. clone ( ) ) ;
106106 action_tx. send ( Action :: EnterMode ( Mode :: ServiceList ) ) ?;
107107 } ,
108108 Err ( e) => {
109- action_tx. send ( Action :: EnterError ( format ! ( "Failed to open editor: {}" , e) ) ) ?;
109+ tui. enter ( ) ?;
110+ tui. clear ( ) ?;
111+ event = EventHandler :: new ( self . home . clone ( ) , action_tx. clone ( ) ) ;
112+ action_tx. send ( Action :: EnterError ( format ! ( "Failed to open editor `{}`: {}" , editor, e) ) ) ?;
110113 } ,
111114 }
112115 } ,
You can’t perform that action at this time.
0 commit comments