File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,14 @@ static char *get_input(void)
202202 return p ;
203203}
204204
205+ static void show_err (void )
206+ {
207+ if (instead_err ()) {
208+ printf ("Error: %s\n" , instead_err ());
209+ instead_err_msg (NULL );
210+ }
211+ }
212+
205213int main (int argc , const char * * argv )
206214{
207215 int rc , i ;
@@ -278,6 +286,7 @@ int main(int argc, const char **argv)
278286 str = instead_cmd (cmd , & rc );
279287 } else
280288 str = instead_cmd ("look" , & rc );
289+ show_err ();
281290 if (!rc && str ) {
282291 fmt (trim (str ), opt_width );
283292 }
@@ -375,10 +384,7 @@ int main(int argc, const char **argv)
375384 free (opt_autoload ); opt_autoload = NULL ;
376385 }
377386 }
378- if (instead_err ()) {
379- printf ("Error: %s\n" , instead_err ());
380- instead_err_msg (NULL );
381- }
387+ show_err ();
382388 }
383389 if (opt_autosave )
384390 free (instead_cmd ("save autosave" , NULL ));
You can’t perform that action at this time.
0 commit comments