Mercurial > vim
changeset 16596:2f86ca0c1e6b v8.1.1301
patch 8.1.1301: when compiled with VIMDLL some messages are not shown
commit https://github.com/vim/vim/commit/0b75f7c97cd7f2529884c48dca8edb02abda4bc5
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 8 22:28:46 2019 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 May 2019 22:30:05 +0200 |
parents | 85a9352e3f45 |
children | f511b61a87c0 |
files | src/gui_w32.c src/main.c src/message.c src/version.c |
diffstat | 4 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -4827,6 +4827,10 @@ ole_error(char *arg) { char buf[IOSIZE]; +# ifdef VIMDLL + gui.in_use = mch_is_gui_executable(); +# endif + /* Can't use emsg() here, we have not finished initialisation yet. */ vim_snprintf(buf, IOSIZE, _("E243: Argument not supported: \"-%s\"; Use the OLE version."),
--- a/src/main.c +++ b/src/main.c @@ -178,6 +178,8 @@ main #ifdef VIMDLL // Check if the current executable file is for the GUI subsystem. gui.starting = mch_is_gui_executable(); +#elif defined(FEAT_GUI_MSWIN) + gui.starting = TRUE; #endif #ifdef FEAT_CLIENTSERVER @@ -3242,6 +3244,14 @@ mainerr( reset_signals(); /* kill us with CTRL-C here, if you like */ #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(); mch_errmsg(longVersion); mch_errmsg("\n");
--- a/src/message.c +++ b/src/message.c @@ -2977,7 +2977,7 @@ mch_errmsg(char *str) int len; #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. * When not going to start the GUI also use stderr. * On Mac, when started from Finder, stderr is the console. */ @@ -3080,7 +3080,7 @@ mch_msg_c(char *str) void 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 * uses mch_errmsg() when started from the desktop. * When not going to start the GUI also use stdout.