Problem: MS-Windows: test failures related to VIMDLL.
Solution: Adjust code and tests. (Ken Takata, closes #5283)
#ifdef FEAT_SEARCHPATH
"file_in_path",
#endif
-#ifdef FEAT_FILTERPIPE
+#if defined(FEAT_FILTERPIPE) && !defined(VIMDLL)
"filterpipe",
#endif
#ifdef FEAT_FIND_ID
#ifdef FEAT_CLIPBOARD
else if (STRICMP(name, "clipboard_working") == 0)
n = clip_star.available;
+#endif
+#ifdef VIMDLL
+ else if (STRICMP(name, "filterpipe") == 0)
+ n = gui.in_use || gui.starting;
#endif
}
pos_T orig_start = curbuf->b_op_start;
pos_T orig_end = curbuf->b_op_end;
int save_lockmarks = cmdmod.lockmarks;
+#ifdef FEAT_FILTERPIPE
+ int stmp = p_stmp;
+#endif
if (*cmd == NUL) /* no filter command */
return;
shell_flags |= SHELL_DOOUT;
#ifdef FEAT_FILTERPIPE
- if (!do_in && do_out && !p_stmp)
+# ifdef VIMDLL
+ if (!gui.in_use && !gui.starting)
+ stmp = 1; // Console mode doesn't support filterpipe.
+# endif
+
+ if (!do_in && do_out && !stmp)
{
/* Use a pipe to fetch stdout of the command, do not use a temp file. */
shell_flags |= SHELL_READ;
curwin->w_cursor.lnum = line2;
}
- else if (do_in && !do_out && !p_stmp)
+ else if (do_in && !do_out && !stmp)
{
/* Use a pipe to write stdin of the command, do not use a temp file. */
shell_flags |= SHELL_WRITE;
curbuf->b_op_start.lnum = line1;
curbuf->b_op_end.lnum = line2;
}
- else if (do_in && do_out && !p_stmp)
+ else if (do_in && do_out && !stmp)
{
/* Use a pipe to write stdin and fetch stdout of the command, do not
* use a temp file. */
HIMC hImc;
static HIMC hImcOld = (HIMC)0;
+# ifdef VIMDLL
+ if (!gui.in_use && !gui.starting)
+ {
+ mbyte_im_set_active(active);
+ return;
+ }
+# endif
+
if (pImmGetContext) /* if NULL imm32.dll wasn't loaded (yet) */
{
if (p_imdisable)
int status = 0;
HIMC hImc;
+# ifdef VIMDLL
+ if (!gui.in_use && !gui.starting)
+ return mbyte_im_get_status();
+# endif
+
if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0)
{
status = pImmGetOpenStatus(hImc) ? 1 : 0;
# define USE_IMSTATUSFUNC (*p_imsf != NUL)
#endif
-#if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM))
+#if defined(FEAT_EVAL) && \
+ (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM) || defined(VIMDLL))
static void
call_imactivatefunc(int active)
{
#else /* !defined(FEAT_XIM) */
-# ifdef IME_WITHOUT_XIM
+# if defined(IME_WITHOUT_XIM) || defined(VIMDLL)
static int im_was_set_active = FALSE;
int
+# ifdef VIMDLL
+mbyte_im_get_status(void)
+# else
im_get_status(void)
+# endif
{
# if defined(FEAT_EVAL)
if (USE_IMSTATUSFUNC)
}
void
+# ifdef VIMDLL
+mbyte_im_set_active(int active_arg)
+# else
im_set_active(int active_arg)
+# endif
{
# if defined(FEAT_EVAL)
int active = !p_imdisable && active_arg;
# endif
}
-# ifdef FEAT_GUI
+# if defined(FEAT_GUI) && !defined(VIMDLL)
void
im_set_position(int row UNUSED, int col UNUSED)
{
if ( addtearoff
&& *next_name
&& vim_strchr(p_go, GO_TEAROFF) != NULL
- && menu_is_menubar(name))
+ && menu_is_menubar(name)
+# ifdef VIMDLL
+ && (gui.in_use || gui.starting)
+# endif
+ )
{
char_u *tearpath;
# include "mouse.pro"
# include "move.pro"
# include "mbyte.pro"
+# ifdef VIMDLL
+// Function name differs when VIMDLL is defined
+int mbyte_im_get_status(void);
+void mbyte_im_set_active(int active_arg);
+# endif
# include "normal.pro"
# include "ops.pro"
# include "option.pro"
if !exists('+termguicolors')
return
endif
- if has('vtp') && !has('vcon')
+ if has('vtp') && !has('vcon') && !has('gui_running')
" Win32: 'guicolors' doesn't work without virtual console.
call assert_fails('set termguicolors', 'E954:')
return
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2361,
/**/
2360,
/**/