From 0f479c4da7f0c62d7422417d3d0601c853f043aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 14 Nov 2016 23:30:17 +0100 Subject: vis: defer UI initialization and overhaul argument parsing Do not initalize curses UI before it is actually needed. Move vis command line argument parsing logic into main.c. This fixes `vis -v` output and exit status. Fix #351 --- vis-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 5dc2a64..6d5d022 100644 --- a/vis-core.h +++ b/vis-core.h @@ -172,6 +172,7 @@ struct Vis { Action action_prev; /* last operator action used by the repeat (dot) command */ Mode *mode; /* currently active mode, used to search for keybindings */ Mode *mode_prev; /* previsouly active user mode */ + bool initialized; /* whether UI and Lua integration has been initialized */ volatile bool running; /* exit main loop once this becomes false */ int exit_status; /* exit status when terminating main loop */ volatile sig_atomic_t cancel_filter; /* abort external command/filter (SIGINT occured) */ -- cgit v1.2.3