diff options
-rw-r--r-- | src/main.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -267,16 +267,7 @@ int main (int argc, char ** argv) { * readfile_argv(argc, argv); */ - /* load file passed as argv to sc-im. - * if more than one file is passed, consider the last one. - */ - load_file(strlen(loadingfile) ? loadingfile : NULL); - - /* - * check if session->cur_doc is NULL (no file passed as argv). - * if so, create an empty doc with just one sheet - */ - if (session->cur_doc == NULL) create_empty_wb(); + create_empty_wb(); /* * load_rc. Since we are not sure what people put it their scimrc file, @@ -285,6 +276,13 @@ int main (int argc, char ** argv) { */ load_rc(); + /* load file passed as argv to sc-im. + * if more than one file is passed, consider the last one. + */ + if (strlen(loadingfile)) + load_file(loadingfile); + + // check input from stdin (pipeline) // and send it to interp read_stdin(); |