patch 8.0.0813: cannot use a terminal window while the job is running
Problem: Cannot use Vim commands in a terminal window while the job is
running.
Solution: Implement Terminal Normal mode.
diff --git a/src/option.c b/src/option.c
index ad58925..6e4d1a5 100644
--- a/src/option.c
+++ b/src/option.c
@@ -8222,12 +8222,22 @@
}
#endif
-#ifdef FEAT_TITLE
/* when 'modifiable' is changed, redraw the window title */
else if ((int *)varp == &curbuf->b_p_ma)
{
+# ifdef FEAT_TERMINAL
+ /* Cannot set 'modifiable' when in Terminal mode. */
+ if (term_in_terminal_mode())
+ {
+ curbuf->b_p_ma = FALSE;
+ return (char_u *)N_("E946: Cannot make a terminal with running job modifiable");
+ }
+# endif
+# ifdef FEAT_TITLE
redraw_titles();
+# endif
}
+#ifdef FEAT_TITLE
/* when 'endofline' is changed, redraw the window title */
else if ((int *)varp == &curbuf->b_p_eol)
{