mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 16:42:42 +00:00
vim-patch:8.1.0230: directly checking 'buftype' value
Problem: Directly checking 'buftype' value.
Solution: Add the bt_normal() function. (Yegappan Lakshmanan)
91335e5a67
This commit is contained in:
@@ -5179,6 +5179,13 @@ bool bt_help(const buf_T *const buf)
|
||||
return buf != NULL && buf->b_help;
|
||||
}
|
||||
|
||||
// Return true if "buf" is a normal buffer, 'buftype' is empty.
|
||||
bool bt_normal(const buf_T *const buf)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
return buf != NULL && buf->b_p_bt[0] == NUL;
|
||||
}
|
||||
|
||||
// Return true if "buf" is the quickfix buffer.
|
||||
bool bt_quickfix(const buf_T *const buf)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
|
||||
Reference in New Issue
Block a user