diff src/buffer.c @ 14175:2ad722003b36 v8.1.0105

patch 8.1.0105: all tab stops are the same commit https://github.com/vim/vim/commit/04958cbaf25eea27eceedaa987adfb354ad5f7fd Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 23 19:23:02 2018 +0200 patch 8.1.0105: all tab stops are the same Problem: All tab stops are the same. Solution: Add the variable tabstop feature. (Christian Brabandt, closes #2711)
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Jun 2018 19:30:07 +0200
parents 1d25a3e8e03c
children 4a94173743d9
line wrap: on
line diff
--- 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)