Skip to content

Commit d7db27b

Browse files
committed
patch 8.0.1589: error for setting 'modifiable' when resetting it
Problem: Error for setting 'modifiable' when resetting it. Solution: Check if 'modifiable' was actually set.
1 parent 52f18a1 commit d7db27b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/option.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8190,8 +8190,8 @@ set_bool_option(
81908190
{
81918191
# ifdef FEAT_TERMINAL
81928192
/* Cannot set 'modifiable' when in Terminal mode. */
8193-
if (term_in_normal_mode()
8194-
|| (bt_terminal(curbuf) && !term_is_finished(curbuf)))
8193+
if (curbuf->b_p_ma && (term_in_normal_mode() || (bt_terminal(curbuf)
8194+
&& curbuf->b_term != NULL && !term_is_finished(curbuf))))
81958195
{
81968196
curbuf->b_p_ma = FALSE;
81978197
return (char_u *)N_("E946: Cannot make a terminal with running job modifiable");

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ static char *(features[]) =
766766

767767
static int included_patches[] =
768768
{ /* Add new patch number below this line */
769+
/**/
770+
1589,
769771
/**/
770772
1588,
771773
/**/

0 commit comments

Comments
 (0)