0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2018-03-07 23:02:33 +01:00
parent 52f18a112a
commit d7db27bafd
2 changed files with 4 additions and 2 deletions

View File

@@ -8190,8 +8190,8 @@ set_bool_option(
{ {
# ifdef FEAT_TERMINAL # ifdef FEAT_TERMINAL
/* Cannot set 'modifiable' when in Terminal mode. */ /* Cannot set 'modifiable' when in Terminal mode. */
if (term_in_normal_mode() if (curbuf->b_p_ma && (term_in_normal_mode() || (bt_terminal(curbuf)
|| (bt_terminal(curbuf) && !term_is_finished(curbuf))) && curbuf->b_term != NULL && !term_is_finished(curbuf))))
{ {
curbuf->b_p_ma = FALSE; curbuf->b_p_ma = FALSE;
return (char_u *)N_("E946: Cannot make a terminal with running job modifiable"); return (char_u *)N_("E946: Cannot make a terminal with running job modifiable");

View File

@@ -766,6 +766,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1589,
/**/ /**/
1588, 1588,
/**/ /**/