patch 8.0.1384: not enough quickfix help; confusing winid
Problem: Not enough quickfix help; confusing winid.
Solution: Add more examples in the help. When the quickfix window is not
present, return zero for getqflist() with 'winid'. Add more tests
for jumping to quickfix list entries. (Yegappan Lakshmanan, closes
#2427)
diff --git a/src/quickfix.c b/src/quickfix.c
index 0e488f1..fbf8a94 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4949,9 +4949,12 @@
if ((status == OK) && (flags & QF_GETLIST_WINID))
{
win_T *win;
+ int win_id = 0;
+
win = qf_find_win(qi);
if (win != NULL)
- status = dict_add_nr_str(retdict, "winid", win->w_id, NULL);
+ win_id = win->w_id;
+ status = dict_add_nr_str(retdict, "winid", win_id, NULL);
}
if ((status == OK) && (flags & QF_GETLIST_ITEMS))
{