summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-28 19:46:49 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-28 19:46:49 +0200
commitafde13b62b8fa25dac4635d5caee8d088b937ee0 (patch)
tree6a8b58aa58e180e55b2948e5d0bfdbc3d4692a49 /src/terminal.c
parentab4cece6053b0bfd604e15065227b94af873608b (diff)
downloadvim-git-afde13b62b8fa25dac4635d5caee8d088b937ee0.tar.gz
patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exev8.1.1230
Problem: A lot of code is shared between vim.exe and gvim.exe. Solution: Optionally put the shared code in vim.dll. (Ken Takata, closes #4287)
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/terminal.c b/src/terminal.c
index a8a1618e6..f007bf23a 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3553,7 +3553,7 @@ init_default_colors(term_T *term)
}
else
{
-#if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
+#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
int tmp;
#endif
@@ -3561,10 +3561,15 @@ init_default_colors(term_T *term)
if (cterm_normal_fg_color > 0)
{
cterm_color2vterm(cterm_normal_fg_color - 1, fg);
-# if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
- tmp = fg->red;
- fg->red = fg->blue;
- fg->blue = tmp;
+# if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+# ifdef VIMDLL
+ if (!gui.in_use)
+# endif
+ {
+ tmp = fg->red;
+ fg->red = fg->blue;
+ fg->blue = tmp;
+ }
# endif
}
# ifdef FEAT_TERMRESPONSE
@@ -3575,10 +3580,15 @@ init_default_colors(term_T *term)
if (cterm_normal_bg_color > 0)
{
cterm_color2vterm(cterm_normal_bg_color - 1, bg);
-# if defined(MSWIN) && !defined(FEAT_GUI_MSWIN)
- tmp = bg->red;
- bg->red = bg->blue;
- bg->blue = tmp;
+# if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+# ifdef VIMDLL
+ if (!gui.in_use)
+# endif
+ {
+ tmp = fg->red;
+ fg->red = fg->blue;
+ fg->blue = tmp;
+ }
# endif
}
# ifdef FEAT_TERMRESPONSE
@@ -3887,7 +3897,7 @@ parse_csi(
#endif
{
// We roughly estimate the position of the terminal window inside
- // the Vim window by assuing a 10 x 7 character cell.
+ // the Vim window by assuming a 10 x 7 character cell.
x += wp->w_wincol * 7;
y += W_WINROW(wp) * 10;
}