/*
* +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)
* 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.
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)
ScreenLinesUC[off] = NUL;
}
}
-# ifdef WIN3264
+#ifdef WIN3264
else if (has_mbyte && c >= 0x80)
{
char_u mb[MB_MAXBYTES+1];
else
ScreenLines[off] = c;
}
-# endif
- else
#endif
+ else
ScreenLines[off] = c;
}
ScreenAttrs[off] = cell2attr(cell.attrs, cell.fg, cell.bg);
++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;