diff src/buffer.c @ 14433:4a94173743d9 v8.1.0230

patch 8.1.0230: directly checking 'buftype' value commit https://github.com/vim/vim/commit/91335e5a67aaa9937e65f1e779b9f3f10fd33ee4 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 1 17:53:12 2018 +0200 patch 8.1.0230: directly checking 'buftype' value Problem: Directly checking 'buftype' value. Solution: Add the bt_normal() function. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Aug 2018 18:00:07 +0200
parents 2ad722003b36
children 95a03484df27
line wrap: on
line diff
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5627,6 +5627,15 @@ write_viminfo_bufferlist(FILE *fp)
 #endif
 
 /*
+ * Return TRUE if "buf" is a normal buffer, 'buftype' is empty.
+ */
+    int
+bt_normal(buf_T *buf)
+{
+    return buf != NULL && buf->b_p_bt[0] == NUL;
+}
+
+/*
  * Return TRUE if "buf" is the quickfix buffer.
  */
     int