summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-01 17:53:12 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-01 17:53:12 +0200
commit91335e5a67aaa9937e65f1e779b9f3f10fd33ee4 (patch)
treeab7a421b7c2dda741870488578e857c237adf517 /src/buffer.c
parentd2855f5454c5c6c5f786b228c5b67757edfefcb1 (diff)
patch 8.1.0230: directly checking 'buftype' valuev8.1.0230
Problem: Directly checking 'buftype' value. Solution: Add the bt_normal() function. (Yegappan Lakshmanan)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 1f1833fc74..f76d849a2f 100644
--- 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