mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
cleanup: remove main_start_gui()
This commit is contained in:
@@ -6975,12 +6975,10 @@ do_exedit (
|
|||||||
ex_no_reprint = TRUE;
|
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)
|
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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_noalt[] INIT(= N_("E23: No alternate file"));
|
||||||
EXTERN char_u e_noabbr[] INIT(= N_("E24: No such abbreviation"));
|
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_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_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_noinstext[] INIT(= N_("E29: No inserted text yet"));
|
||||||
EXTERN char_u e_nolastcmd[] INIT(= N_("E30: No previous command line"));
|
EXTERN char_u e_nolastcmd[] INIT(= N_("E30: No previous command line"));
|
||||||
|
@@ -864,10 +864,6 @@ static void command_line_scan(mparm_T *parmp)
|
|||||||
case 'f': /* "-f" GUI: run in foreground. */
|
case 'f': /* "-f" GUI: run in foreground. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'g': /* "-g" start GUI */
|
|
||||||
main_start_gui();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'F': { // "-F" start in Farsi mode: rl + fkmap set.
|
case 'F': { // "-F" start in Farsi mode: rl + fkmap set.
|
||||||
p_fkmap = true;
|
p_fkmap = true;
|
||||||
set_option_value("rl", 1L, NULL, 0);
|
set_option_value("rl", 1L, NULL, 0);
|
||||||
@@ -906,18 +902,8 @@ static void command_line_scan(mparm_T *parmp)
|
|||||||
parmp->no_swap_file = TRUE;
|
parmp->no_swap_file = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p': /* "-p[N]" open N tab pages */
|
case 'p': // "-p[N]" open N tab pages
|
||||||
#ifdef TARGET_API_MAC_OSX
|
// default is 0: open window for each file
|
||||||
/* 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 */
|
|
||||||
parmp->window_count = get_number_arg(argv[0], &argv_idx, 0);
|
parmp->window_count = get_number_arg(argv[0], &argv_idx, 0);
|
||||||
parmp->window_layout = WIN_TABS;
|
parmp->window_layout = WIN_TABS;
|
||||||
break;
|
break;
|
||||||
@@ -1834,17 +1820,6 @@ static void source_startup_scripts(const mparm_T *const parmp)
|
|||||||
TIME_MSG("sourcing vimrc file(s)");
|
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.
|
/// Get an environment variable, and execute it as Ex commands.
|
||||||
///
|
///
|
||||||
/// @param env environment variable to execute
|
/// @param env environment variable to execute
|
||||||
|
Reference in New Issue
Block a user