summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-22 22:21:37 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-22 22:21:37 +0200
commitec0e07a32484ab70f1c7668294c3d8d67f8aca82 (patch)
treeef88120d91c9357124c44e84f612d32596ff0a86
parent6d0826dfbba9880820d9ec221327e4250bbf6540 (diff)
patch 8.0.0986: terminal feature always requires multi-byte featurev8.0.0986
Problem: Terminal feature always requires multi-byte feature. Solution: Remove #ifdef FEAT_MBYTE, disable terminal without multi-byte.
-rw-r--r--src/feature.h4
-rw-r--r--src/terminal.c11
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 10 deletions
diff --git a/src/feature.h b/src/feature.h
index ae3859b815..b7f3664266 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1269,8 +1269,10 @@
/*
* +terminal ":terminal" command. Runs a terminal in a window.
+ * requires +channel and +multibyte
*/
-#if !defined(FEAT_JOB_CHANNEL) && defined(FEAT_TERMINAL)
+#if defined(FEAT_TERMINAL) && \
+ !(defined(FEAT_JOB_CHANNEL) && defined(FEAT_MBYTE))
# undef FEAT_TERMINAL
#endif
#if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)
diff --git a/src/terminal.c b/src/terminal.c
index 551fbe70e8..3ee50e490f 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -63,7 +63,6 @@
* mouse in the Terminal window for copy/paste.
* - when 'encoding' is not utf-8, or the job is using another encoding, setup
* conversions.
- * - update ":help function-list" for terminal functions.
* - In the GUI use a terminal emulator for :!cmd.
* - Copy text in the vterm to the Vim buffer once in a while, so that
* completion works.
@@ -2103,14 +2102,11 @@ term_update_window(win_T *wp)
if (c == NUL)
{
ScreenLines[off] = ' ';
-#if defined(FEAT_MBYTE)
if (enc_utf8)
ScreenLinesUC[off] = NUL;
-#endif
}
else
{
-#if defined(FEAT_MBYTE)
if (enc_utf8)
{
if (c >= 0x80)
@@ -2124,7 +2120,7 @@ term_update_window(win_T *wp)
ScreenLinesUC[off] = NUL;
}
}
-# ifdef WIN3264
+#ifdef WIN3264
else if (has_mbyte && c >= 0x80)
{
char_u mb[MB_MAXBYTES+1];
@@ -2140,9 +2136,8 @@ term_update_window(win_T *wp)
else
ScreenLines[off] = c;
}
-# endif
- else
#endif
+ else
ScreenLines[off] = c;
}
ScreenAttrs[off] = cell2attr(cell.attrs, cell.fg, cell.bg);
@@ -2151,11 +2146,9 @@ term_update_window(win_T *wp)
++off;
if (cell.width == 2)
{
-#if defined(FEAT_MBYTE)
if (enc_utf8)
ScreenLinesUC[off] = NUL;
else if (!has_mbyte)
-#endif
ScreenLines[off] = NUL;
++pos.col;
++off;
diff --git a/src/version.c b/src/version.c
index ef0209e573..6baf62be44 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 986,
+/**/
985,
/**/
984,