diff options
author | mongo <andmarti@gmail.com> | 2023-06-01 10:30:47 -0300 |
---|---|---|
committer | mongo <andmarti@gmail.com> | 2023-06-01 10:30:47 -0300 |
commit | 0cf3ab008651466d6deec361191d68deb3a22998 (patch) | |
tree | 027d6610a229c43f6dbc82a971aaff6f8003a0c1 | |
parent | 0301dc866e1c8bab8a3f2a2bbfc6bc93f26a513b (diff) | |
parent | 6e85f75b99f34e167bca3456c0c8c224cf5af0c7 (diff) |
Merge branch 'pr-783' into dev
-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(); |