WORD attrFlash = ~g_attrCurrent & 0xff;
DWORD dwDummy;
- LPWORD oldattrs = ALLOC_MULT(WORD, Rows * Columns);
+ LPWORD oldattrs = NULL;
- if (oldattrs == NULL)
- return;
- ReadConsoleOutputAttribute(g_hConOut, oldattrs, Rows * Columns,
+# ifdef FEAT_TERMGUICOLORS
+ if (!(p_tgc || t_colors >= 256))
+# endif
+ {
+ oldattrs = ALLOC_MULT(WORD, Rows * Columns);
+ if (oldattrs == NULL)
+ return;
+ ReadConsoleOutputAttribute(g_hConOut, oldattrs, Rows * Columns,
coordOrigin, &dwDummy);
+ }
+
FillConsoleOutputAttribute(g_hConOut, attrFlash, Rows * Columns,
coordOrigin, &dwDummy);
Sleep(15); // wait for 15 msec
- if (!vtp_working)
+
+ if (oldattrs != NULL)
+ {
WriteConsoleOutputAttribute(g_hConOut, oldattrs, Rows * Columns,
coordOrigin, &dwDummy);
- vim_free(oldattrs);
+ vim_free(oldattrs);
+ }
}
wt_working = mch_getenv("WT_SESSION") != NULL;
}
- int
-use_wt(void)
-{
- return USE_WT;
-}
-
# ifdef FEAT_TERMGUICOLORS
static int
ctermtoxterm(
void fix_arg_enc(void);
int mch_setenv(char *var, char *value, int x);
int vtp_printf(char *format, ...);
-int use_wt(void);
void get_default_console_color(int *cterm_fg, int *cterm_bg, guicolor_T *gui_fg, guicolor_T *gui_bg);
void control_console_color_rgb(void);
int use_vtp(void);
vim_snprintf(buf, MAX_COLOR_STR_LEN,
(char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
#ifdef FEAT_VTP
- if (use_wt())
+ if (use_vtp() && (p_tgc || t_colors >= 256))
{
out_flush();
buf[1] = '[';