diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-28 13:40:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 13:40:34 -0400 |
commit | 63c2a7af2da3998167c7b1b06fb461b20b144c78 (patch) | |
tree | 77aa1b22e65a65c62fa4a062bb88945e02f5d5ca /src/nvim/buffer.c | |
parent | 6d4a922e07e857b46d882ea96decce7c7c6e2a30 (diff) | |
parent | a70d904ad0e2037c7fb2ae10a20f840af3544496 (diff) | |
download | rneovim-63c2a7af2da3998167c7b1b06fb461b20b144c78.tar.gz rneovim-63c2a7af2da3998167c7b1b06fb461b20b144c78.tar.bz2 rneovim-63c2a7af2da3998167c7b1b06fb461b20b144c78.zip |
Merge pull request #13851 from VVKot/vim-8.1.0105
vim-patch:8.1.{0105,0114,0116,0126,0138,0154,0479,0542,0936}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index c42a0e2dad..cc9f130bfc 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -282,7 +282,7 @@ int open_buffer( // Set/reset the Changed flag first, autocmds may change the buffer. // Apply the automatic commands, before processing the modelines. - // So the modelines have priority over auto commands. + // So the modelines have priority over autocommands. // When reading stdin, the buffer contents always needs writing, so set // the changed flag. Unless in readonly mode: "ls | nvim -R -". @@ -1946,6 +1946,17 @@ void free_buf_options(buf_T *buf, int free_p_ff) clear_string_option(&buf->b_p_fo); clear_string_option(&buf->b_p_flp); clear_string_option(&buf->b_p_isk); + clear_string_option(&buf->b_p_vsts); + if (buf->b_p_vsts_nopaste) { + xfree(buf->b_p_vsts_nopaste); + } + buf->b_p_vsts_nopaste = NULL; + if (buf->b_p_vsts_array) { + xfree(buf->b_p_vsts_array); + } + buf->b_p_vsts_array = NULL; + clear_string_option(&buf->b_p_vts); + XFREE_CLEAR(buf->b_p_vts_array); clear_string_option(&buf->b_p_keymap); keymap_ga_clear(&buf->b_kmap_ga); ga_clear(&buf->b_kmap_ga); @@ -5375,8 +5386,8 @@ bool bt_terminal(const buf_T *const buf) return buf != NULL && buf->b_p_bt[0] == 't'; } -// Return true if "buf" is a "nofile", "acwrite" or "terminal" buffer. -// This means the buffer name is not a file name. +// Return true if "buf" is a "nofile", "acwrite", "terminal" or "prompt" +// buffer. This means the buffer name is not a file name. bool bt_nofile(const buf_T *const buf) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { @@ -5386,7 +5397,8 @@ bool bt_nofile(const buf_T *const buf) || buf->b_p_bt[0] == 'p'); } -// Return true if "buf" is a "nowrite", "nofile" or "terminal" buffer. +// Return true if "buf" is a "nowrite", "nofile", "terminal" or "prompt" +// buffer. bool bt_dontwrite(const buf_T *const buf) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { |