1
0
forked from aniani/vim

patch 8.0.0986: terminal feature always requires multi-byte feature

Problem:    Terminal feature always requires multi-byte feature.
Solution:   Remove #ifdef FEAT_MBYTE, disable terminal without multi-byte.
This commit is contained in:
Bram Moolenaar
2017-08-22 22:21:37 +02:00
parent 6d0826dfbb
commit ec0e07a324
3 changed files with 7 additions and 10 deletions

View File

@@ -1269,8 +1269,10 @@
/* /*
* +terminal ":terminal" command. Runs a terminal in a window. * +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 # undef FEAT_TERMINAL
#endif #endif
#if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE) #if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)

View File

@@ -63,7 +63,6 @@
* mouse in the Terminal window for copy/paste. * mouse in the Terminal window for copy/paste.
* - when 'encoding' is not utf-8, or the job is using another encoding, setup * - when 'encoding' is not utf-8, or the job is using another encoding, setup
* conversions. * conversions.
* - update ":help function-list" for terminal functions.
* - In the GUI use a terminal emulator for :!cmd. * - In the GUI use a terminal emulator for :!cmd.
* - Copy text in the vterm to the Vim buffer once in a while, so that * - Copy text in the vterm to the Vim buffer once in a while, so that
* completion works. * completion works.
@@ -2103,14 +2102,11 @@ term_update_window(win_T *wp)
if (c == NUL) if (c == NUL)
{ {
ScreenLines[off] = ' '; ScreenLines[off] = ' ';
#if defined(FEAT_MBYTE)
if (enc_utf8) if (enc_utf8)
ScreenLinesUC[off] = NUL; ScreenLinesUC[off] = NUL;
#endif
} }
else else
{ {
#if defined(FEAT_MBYTE)
if (enc_utf8) if (enc_utf8)
{ {
if (c >= 0x80) if (c >= 0x80)
@@ -2142,7 +2138,6 @@ term_update_window(win_T *wp)
} }
#endif #endif
else else
#endif
ScreenLines[off] = c; ScreenLines[off] = c;
} }
ScreenAttrs[off] = cell2attr(cell.attrs, cell.fg, cell.bg); ScreenAttrs[off] = cell2attr(cell.attrs, cell.fg, cell.bg);
@@ -2151,11 +2146,9 @@ term_update_window(win_T *wp)
++off; ++off;
if (cell.width == 2) if (cell.width == 2)
{ {
#if defined(FEAT_MBYTE)
if (enc_utf8) if (enc_utf8)
ScreenLinesUC[off] = NUL; ScreenLinesUC[off] = NUL;
else if (!has_mbyte) else if (!has_mbyte)
#endif
ScreenLines[off] = NUL; ScreenLines[off] = NUL;
++pos.col; ++pos.col;
++off; ++off;

View File

@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
986,
/**/ /**/
985, 985,
/**/ /**/