patch 8.0.0693: no terminal emulator support
Problem: No terminal emulator support. Cannot properly run commands in the
GUI. Cannot run a job interactively with an ssh connection.
Solution: Very early implementation of the :terminal command. Includes
libvterm converted to ANSI C. Many parts still missing.
diff --git a/src/option.c b/src/option.c
index 8097a7f..ebc547e 100644
--- a/src/option.c
+++ b/src/option.c
@@ -257,6 +257,9 @@
# define PV_COCU OPT_WIN(WV_COCU)
# define PV_COLE OPT_WIN(WV_COLE)
#endif
+#ifdef FEAT_TERMINAL
+# define PV_TMS OPT_WIN(WV_TMS)
+#endif
#ifdef FEAT_SIGNS
# define PV_SCL OPT_WIN(WV_SCL)
#endif
@@ -2778,6 +2781,15 @@
{(char_u *)FALSE, (char_u *)FALSE}
#endif
SCRIPTID_INIT},
+ {"termsize", "tms", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+#ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TMS,
+ {(char_u *)"", (char_u *)NULL}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+#endif
+ SCRIPTID_INIT},
{"terse", NULL, P_BOOL|P_VI_DEF,
(char_u *)&p_terse, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
@@ -10662,8 +10674,11 @@
case PV_CRBIND: return (char_u *)&(curwin->w_p_crb);
#endif
#ifdef FEAT_CONCEAL
- case PV_COCU: return (char_u *)&(curwin->w_p_cocu);
- case PV_COLE: return (char_u *)&(curwin->w_p_cole);
+ case PV_COCU: return (char_u *)&(curwin->w_p_cocu);
+ case PV_COLE: return (char_u *)&(curwin->w_p_cole);
+#endif
+#ifdef FEAT_TERMINAL
+ case PV_TMS: return (char_u *)&(curwin->w_p_tms);
#endif
case PV_AI: return (char_u *)&(curbuf->b_p_ai);
@@ -10871,6 +10886,9 @@
to->wo_cocu = vim_strsave(from->wo_cocu);
to->wo_cole = from->wo_cole;
#endif
+#ifdef FEAT_TERMINAL
+ to->wo_tms = vim_strsave(from->wo_tms);
+#endif
#ifdef FEAT_FOLDING
to->wo_fdc = from->wo_fdc;
to->wo_fdc_save = from->wo_fdc_save;
@@ -10937,6 +10955,9 @@
#ifdef FEAT_CONCEAL
check_string_option(&wop->wo_cocu);
#endif
+#ifdef FEAT_TERMINAL
+ check_string_option(&wop->wo_tms);
+#endif
#ifdef FEAT_LINEBREAK
check_string_option(&wop->wo_briopt);
#endif
@@ -10976,6 +10997,9 @@
#ifdef FEAT_CONCEAL
clear_string_option(&wop->wo_cocu);
#endif
+#ifdef FEAT_TERMINAL
+ clear_string_option(&wop->wo_tms);
+#endif
}
/*