diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-06-23 19:23:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-06-23 19:23:02 +0200 |
commit | 04958cbaf25eea27eceedaa987adfb354ad5f7fd (patch) | |
tree | 9a47e4e99b5b702e12d08c0424a91ae701eabb4d /src/buffer.c | |
parent | 5ec7414a1c0512832f60c17437d6374cbf4b08e9 (diff) |
patch 8.1.0105: all tab stops are the samev8.1.0105
Problem: All tab stops are the same.
Solution: Add the variable tabstop feature. (Christian Brabandt,
closes #2711)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index 254aad461d..1f1833fc74 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -271,7 +271,7 @@ 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 | gview -". @@ -2159,6 +2159,19 @@ free_buf_options( clear_string_option(&buf->b_p_fo); clear_string_option(&buf->b_p_flp); clear_string_option(&buf->b_p_isk); +#ifdef FEAT_VARTABS + clear_string_option(&buf->b_p_vsts); + if (buf->b_p_vsts_nopaste) + vim_free(buf->b_p_vsts_nopaste); + buf->b_p_vsts_nopaste = NULL; + if (buf->b_p_vsts_array) + vim_free(buf->b_p_vsts_array); + buf->b_p_vsts_array = NULL; + clear_string_option(&buf->b_p_vts); + if (buf->b_p_vts_array) + vim_free(buf->b_p_vts_array); + buf->b_p_vts_array = NULL; +#endif #ifdef FEAT_KEYMAP clear_string_option(&buf->b_p_keymap); keymap_clear(&buf->b_kmap_ga); @@ -5190,7 +5203,7 @@ ex_buffer_all(exarg_T *eap) win_close(wp, FALSE); wpnext = firstwin; /* just in case an autocommand does something strange with windows */ - tpnext = first_tabpage; /* start all over...*/ + tpnext = first_tabpage; /* start all over... */ open_wins = 0; } else @@ -5650,8 +5663,8 @@ bt_prompt(buf_T *buf) } /* - * 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. */ int bt_nofile(buf_T *buf) @@ -5663,7 +5676,8 @@ bt_nofile(buf_T *buf) } /* - * Return TRUE if "buf" is a "nowrite", "nofile" or "terminal" buffer. + * Return TRUE if "buf" is a "nowrite", "nofile", "terminal" or "prompt" + * buffer. */ int bt_dontwrite(buf_T *buf) |