mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1301: when compiled with VIMDLL some messages are not shown
Problem: When compiled with VIMDLL some messages are not shown. Solution: Set/reset gui.in_use and gui.starting as needed. (Ken Takata, closes #4361)
This commit is contained in:
parent
2f10658b06
commit
0b75f7c97c
@ -4827,6 +4827,10 @@ ole_error(char *arg)
|
|||||||
{
|
{
|
||||||
char buf[IOSIZE];
|
char buf[IOSIZE];
|
||||||
|
|
||||||
|
# ifdef VIMDLL
|
||||||
|
gui.in_use = mch_is_gui_executable();
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Can't use emsg() here, we have not finished initialisation yet. */
|
/* Can't use emsg() here, we have not finished initialisation yet. */
|
||||||
vim_snprintf(buf, IOSIZE,
|
vim_snprintf(buf, IOSIZE,
|
||||||
_("E243: Argument not supported: \"-%s\"; Use the OLE version."),
|
_("E243: Argument not supported: \"-%s\"; Use the OLE version."),
|
||||||
|
10
src/main.c
10
src/main.c
@ -178,6 +178,8 @@ main
|
|||||||
#ifdef VIMDLL
|
#ifdef VIMDLL
|
||||||
// Check if the current executable file is for the GUI subsystem.
|
// Check if the current executable file is for the GUI subsystem.
|
||||||
gui.starting = mch_is_gui_executable();
|
gui.starting = mch_is_gui_executable();
|
||||||
|
#elif defined(FEAT_GUI_MSWIN)
|
||||||
|
gui.starting = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_CLIENTSERVER
|
#ifdef FEAT_CLIENTSERVER
|
||||||
@ -3242,6 +3244,14 @@ mainerr(
|
|||||||
reset_signals(); /* kill us with CTRL-C here, if you like */
|
reset_signals(); /* kill us with CTRL-C here, if you like */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// If this is a Windows GUI executable, show an error dialog box.
|
||||||
|
#ifdef VIMDLL
|
||||||
|
gui.in_use = mch_is_gui_executable();
|
||||||
|
#endif
|
||||||
|
#ifdef FEAT_GUI_MSWIN
|
||||||
|
gui.starting = FALSE; // Needed to show as error.
|
||||||
|
#endif
|
||||||
|
|
||||||
init_longVersion();
|
init_longVersion();
|
||||||
mch_errmsg(longVersion);
|
mch_errmsg(longVersion);
|
||||||
mch_errmsg("\n");
|
mch_errmsg("\n");
|
||||||
|
@ -2977,7 +2977,7 @@ mch_errmsg(char *str)
|
|||||||
int len;
|
int len;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(UNIX) || defined(FEAT_GUI)) && (!defined(ALWAYS_USE_GUI) || !defined(VIMDLL))
|
#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI) && !defined(VIMDLL)
|
||||||
/* On Unix use stderr if it's a tty.
|
/* On Unix use stderr if it's a tty.
|
||||||
* When not going to start the GUI also use stderr.
|
* When not going to start the GUI also use stderr.
|
||||||
* On Mac, when started from Finder, stderr is the console. */
|
* On Mac, when started from Finder, stderr is the console. */
|
||||||
@ -3080,7 +3080,7 @@ mch_msg_c(char *str)
|
|||||||
void
|
void
|
||||||
mch_msg(char *str)
|
mch_msg(char *str)
|
||||||
{
|
{
|
||||||
#if (defined(UNIX) || defined(FEAT_GUI)) && (!defined(ALWAYS_USE_GUI) || !defined(VIMDLL))
|
#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI) && !defined(VIMDLL)
|
||||||
/* On Unix use stdout if we have a tty. This allows "vim -h | more" and
|
/* On Unix use stdout if we have a tty. This allows "vim -h | more" and
|
||||||
* uses mch_errmsg() when started from the desktop.
|
* uses mch_errmsg() when started from the desktop.
|
||||||
* When not going to start the GUI also use stdout.
|
* When not going to start the GUI also use stdout.
|
||||||
|
@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1301,
|
||||||
/**/
|
/**/
|
||||||
1300,
|
1300,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user