diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-07-29 20:59:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-29 20:59:38 +0200 |
commit | bae02eb3968be1c9677283d030fbbe6dd02cb180 (patch) | |
tree | 826839463784f5464c8b4203eafc1c0d98205b91 /src/nvim/buffer.c | |
parent | 6e03f87e0991b5b0dfffa79ae580b87e40468da1 (diff) | |
parent | d6b31721bfadabf5eaa817321706d403ecfbf805 (diff) | |
download | rneovim-bae02eb3968be1c9677283d030fbbe6dd02cb180.tar.gz rneovim-bae02eb3968be1c9677283d030fbbe6dd02cb180.tar.bz2 rneovim-bae02eb3968be1c9677283d030fbbe6dd02cb180.zip |
Merge #10645 from janlazo/vim-8.1.0999
vim-patch:8.1.{1005,1041,1049,1052,1053,1086,1394}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 34fe52c10e..89f1e33a86 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -5171,18 +5171,21 @@ chk_modeline( // Return true if "buf" is a help buffer. bool bt_help(const buf_T *const buf) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return buf != NULL && buf->b_help; } // Return true if "buf" is the quickfix buffer. bool bt_quickfix(const buf_T *const buf) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return buf != NULL && buf->b_p_bt[0] == 'q'; } // Return true if "buf" is a terminal buffer. bool bt_terminal(const buf_T *const buf) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return buf != NULL && buf->b_p_bt[0] == 't'; } @@ -5190,6 +5193,7 @@ bool bt_terminal(const buf_T *const buf) // Return true if "buf" is a "nofile", "acwrite" or "terminal" 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 { return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f') || buf->b_p_bt[0] == 'a' || buf->terminal); @@ -5197,11 +5201,13 @@ bool bt_nofile(const buf_T *const buf) // Return true if "buf" is a "nowrite", "nofile" or "terminal" buffer. bool bt_dontwrite(const buf_T *const buf) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return buf != NULL && (buf->b_p_bt[0] == 'n' || buf->terminal); } bool bt_dontwrite_msg(const buf_T *const buf) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { if (bt_dontwrite(buf)) { EMSG(_("E382: Cannot write, 'buftype' option is set")); |