aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-04-08 14:04:58 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-04-11 01:58:42 +0200
commit7362ca44305d11c41d0dee14f49d0ac248abacf8 (patch)
treea6d3ef44f1da983c74038d14a41bf807d392c17b /src
parent9f598e57656fe072114b9f1e73d3051423e13234 (diff)
downloadrneovim-7362ca44305d11c41d0dee14f49d0ac248abacf8.tar.gz
rneovim-7362ca44305d11c41d0dee14f49d0ac248abacf8.tar.bz2
rneovim-7362ca44305d11c41d0dee14f49d0ac248abacf8.zip
cleanup: remove main_start_gui()
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c6
-rw-r--r--src/nvim/globals.h1
-rw-r--r--src/nvim/main.c29
3 files changed, 4 insertions, 32 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 4b37abab9e..93cb0e50fa 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -6975,12 +6975,10 @@ do_exedit (
ex_no_reprint = TRUE;
}
-/*
- * ":gui" and ":gvim" when there is no GUI.
- */
+/// ":gui" and ":gvim" when there is no GUI.
static void ex_nogui(exarg_T *eap)
{
- eap->errmsg = e_nogvim;
+ eap->errmsg = (char_u *)N_("E25: Nvim does not have a built-in GUI");
}
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 776f131437..89d93310a6 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -1070,7 +1070,6 @@ EXTERN char_u e_nesting[] INIT(= N_("E22: Scripts nested too deep"));
EXTERN char_u e_noalt[] INIT(= N_("E23: No alternate file"));
EXTERN char_u e_noabbr[] INIT(= N_("E24: No such abbreviation"));
EXTERN char_u e_nobang[] INIT(= N_("E477: No ! allowed"));
-EXTERN char_u e_nogvim[] INIT(= N_("E25: Nvim does not have a built-in GUI"));
EXTERN char_u e_nogroup[] INIT(= N_("E28: No such highlight group name: %s"));
EXTERN char_u e_noinstext[] INIT(= N_("E29: No inserted text yet"));
EXTERN char_u e_nolastcmd[] INIT(= N_("E30: No previous command line"));
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 4288d7f9d7..cd7c13ae9a 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -864,10 +864,6 @@ static void command_line_scan(mparm_T *parmp)
case 'f': /* "-f" GUI: run in foreground. */
break;
- case 'g': /* "-g" start GUI */
- main_start_gui();
- break;
-
case 'F': { // "-F" start in Farsi mode: rl + fkmap set.
p_fkmap = true;
set_option_value("rl", 1L, NULL, 0);
@@ -906,18 +902,8 @@ static void command_line_scan(mparm_T *parmp)
parmp->no_swap_file = TRUE;
break;
- case 'p': /* "-p[N]" open N tab pages */
-#ifdef TARGET_API_MAC_OSX
- /* For some reason on MacOS X, an argument like:
- -psn_0_10223617 is passed in when invoke from Finder
- or with the 'open' command */
- if (argv[0][argv_idx] == 's') {
- argv_idx = -1; /* bypass full -psn */
- main_start_gui();
- break;
- }
-#endif
- /* default is 0: open window for each file */
+ case 'p': // "-p[N]" open N tab pages
+ // default is 0: open window for each file
parmp->window_count = get_number_arg(argv[0], &argv_idx, 0);
parmp->window_layout = WIN_TABS;
break;
@@ -1834,17 +1820,6 @@ static void source_startup_scripts(const mparm_T *const parmp)
TIME_MSG("sourcing vimrc file(s)");
}
-/*
- * Setup to start using the GUI. Exit with an error when not available.
- */
-static void main_start_gui(void)
-{
- mch_errmsg(_(e_nogvim));
- mch_errmsg("\n");
- mch_exit(2);
-}
-
-
/// Get an environment variable, and execute it as Ex commands.
///
/// @param env environment variable to execute