aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2013-02-21 21:49:19 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2013-02-22 01:18:06 +0100
commit5611d53c8c5ecf586233636d6090ce7e47644e04 (patch)
tree3e14daa1cb71778d5f54a3714eaba32fdc226eae /src/main.cpp
parent8f0e72f0fedbfc8e4f26bff93472d0c1d59247df (diff)
downloadsciteco-5611d53c8c5ecf586233636d6090ce7e47644e04.tar.gz
fixed global object initialization order issue
* Scintilla is now initialized from main() using Interface::main() * Scintilla initialization depends on initialization of objects in the global namespace (otherwise the Lexer catalogue may not be filled properly and lexing may not work). Lexer modules were initialized after SciTECO interface initialization * merged Scintilla initialization (Interface::main()) with interface option parsing
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 78e4daa..9979ee8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -160,9 +160,7 @@ process_options(int &argc, char **&argv)
mung_file = get_teco_ini(argv[0]);
}
- interface.parse_args(argc, argv);
-
- /* remaining arguments, are arguments to the munged file */
+ /* remaining arguments, are arguments to the interface */
}
static inline void
@@ -197,6 +195,8 @@ main(int argc, char **argv)
signal(SIGINT, sigint_handler);
process_options(argc, argv);
+ interface.main(argc, argv);
+ /* remaining arguments are arguments to the munged file */
interface.ssm(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK);
interface.ssm(SCI_SETCARETFORE, 0xFFFFFF);