patch 8.1.0230: directly checking 'buftype' value
Problem: Directly checking 'buftype' value.
Solution: Add the bt_normal() function. (Yegappan Lakshmanan)
diff --git a/src/quickfix.c b/src/quickfix.c
index aac1e34..97bfb37 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2487,7 +2487,7 @@
win_T *wp;
FOR_ALL_WINDOWS(wp)
- if (wp->w_buffer->b_p_bt[0] == NUL)
+ if (bt_normal(wp->w_buffer))
return wp;
return NULL;
@@ -2563,7 +2563,7 @@
win = curwin;
do
{
- if (win->w_buffer->b_p_bt[0] == NUL)
+ if (bt_normal(win->w_buffer))
break;
if (win->w_prev == NULL)
win = lastwin; /* wrap around the top */
@@ -2620,8 +2620,7 @@
}
/* Remember a usable window. */
- if (altwin == NULL && !win->w_p_pvw
- && win->w_buffer->b_p_bt[0] == NUL)
+ if (altwin == NULL && !win->w_p_pvw && bt_normal(win->w_buffer))
altwin = win;
}