diff options
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 39117b262a..8e55cced78 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2377,7 +2377,6 @@ static void qf_fill_buffer(qf_info_T *qi) KeyTyped = old_KeyTyped; } - /* * Return TRUE if "buf" is the quickfix buffer. */ @@ -2386,22 +2385,18 @@ int bt_quickfix(buf_T *buf) return buf != NULL && buf->b_p_bt[0] == 'q'; } -/* - * Return TRUE if "buf" is a "nofile" or "acwrite" buffer. - * This means the buffer name is not a file name. - */ +// Return TRUE if "buf" is a "nofile", "acwrite" or "terminal" buffer. +// This means the buffer name is not a file name. int bt_nofile(buf_T *buf) { return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f') - || buf->b_p_bt[0] == 'a'); + || buf->b_p_bt[0] == 'a' || buf->terminal); } -/* - * Return TRUE if "buf" is a "nowrite" or "nofile" buffer. - */ +// Return TRUE if "buf" is a "nowrite", "nofile" or "terminal" buffer. int bt_dontwrite(buf_T *buf) { - return buf != NULL && buf->b_p_bt[0] == 'n'; + return buf != NULL && (buf->b_p_bt[0] == 'n' || buf->terminal); } int bt_dontwrite_msg(buf_T *buf) |