patch 8.0.0836: can abandon a terminal buffer after making a change
Problem: When a terminal buffer is changed it can still be accidentally
abandoned.
Solution: When making a change reset the 'buftype' option.
diff --git a/src/option.c b/src/option.c
index 2347461..d937d02 100644
--- a/src/option.c
+++ b/src/option.c
@@ -8228,7 +8228,8 @@
{
# ifdef FEAT_TERMINAL
/* Cannot set 'modifiable' when in Terminal mode. */
- if (term_in_terminal_mode())
+ if (term_in_terminal_mode()
+ || (bt_terminal(curbuf) && !term_is_finished(curbuf)))
{
curbuf->b_p_ma = FALSE;
return (char_u *)N_("E946: Cannot make a terminal with running job modifiable");