diff options
-rw-r--r-- | src/main.c | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -267,24 +267,23 @@ 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, + * load_rc. Since we are not sure what people put in their scimrc file, * other than configuration variables and mappings, * we call the load_rc() routine after session / roman / sheet are alloc'ed. + * See entire 778 issue and 783 PR for details on why this order is set. */ 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(); |