summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-30 16:52:24 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-30 16:52:24 +0200
commit423802d1a282df35078539970eabf559186e1ec8 (patch)
tree0a252bea57b2e78f9407066ebe3ca0a0a093cbc1 /src/option.c
parent68c4bdd53cb54b6c0dccb2dcee446ef42ef3dedd (diff)
downloadvim-git-423802d1a282df35078539970eabf559186e1ec8.tar.gz
patch 8.0.0813: cannot use a terminal window while the job is runningv8.0.0813
Problem: Cannot use Vim commands in a terminal window while the job is running. Solution: Implement Terminal Normal mode.
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c
index ad5892581..6e4d1a5df 100644
--- a/src/option.c
+++ b/src/option.c
@@ -8222,12 +8222,22 @@ set_bool_option(
}
#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)
{