1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2017-08-01 20:25:22 +02:00
parent 65cedb2074
commit 20e6cd07ba
4 changed files with 44 additions and 12 deletions

View File

@@ -8228,7 +8228,8 @@ set_bool_option(
{
# 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");