summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-04 16:54:11 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-04 16:54:11 +0200
commit7da1fb5532890d9c15cdb5b9bec158f9f9c105a7 (patch)
tree154175fbc4976c586ac95cd7448f6339d8e7a37f /src/terminal.c
parent87ea64ca965ca00b3e72776c39355964293f2ace (diff)
downloadvim-git-7da1fb5532890d9c15cdb5b9bec158f9f9c105a7.tar.gz
patch 8.1.0238: 'buftype' is cleared when using ":term ++hidden cat"v8.1.0238
Problem: 'buftype' is cleared when using ":term ++hidden cat". (Marcin Szamotulski) Solution: Set the "options initialized" flag earlier. (closes #3278)
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 22b90c833..427e027c5 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -529,6 +529,8 @@ term_start(
set_string_option_direct((char_u *)"buftype", -1,
(char_u *)"terminal", OPT_FREE|OPT_LOCAL, 0);
+ // Avoid that 'buftype' is reset when this buffer is entered.
+ curbuf->b_p_initialized = TRUE;
/* Mark the buffer as not modifiable. It can only be made modifiable after
* the job finished. */