summaryrefslogtreecommitdiff
path: root/test/editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/editor.cxx')
-rw-r--r--test/editor.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/editor.cxx b/test/editor.cxx
index 3e38a5022..1c9db095f 100644
--- a/test/editor.cxx
+++ b/test/editor.cxx
@@ -789,16 +789,22 @@ Fl_Window* new_view() {
return w;
}
+void cb(const char *fname) {
+ load_file(fname, -1);
+}
+
int main(int argc, char **argv) {
textbuf = new Fl_Text_Buffer;
//textbuf->transcoding_warning_action = NULL;
style_init();
+ fl_open_callback(cb);
Fl_Window* window = new_view();
window->show(1, argv);
-
+#ifndef __APPLE__
if (argc > 1) load_file(argv[1], -1);
+#endif
return Fl::run();
}