vim-patch:7.4.2215

Problem:    It's not easy to find out if a window is a quickfix or location
            list window.
Solution:   Add "loclist" and "quickfix" entries to the dict returnec by
            getwininfo(). (Yegappan Lakshmanan)

386600f0cb
This commit is contained in:
James McCoy
2016-11-15 13:41:01 -05:00
parent 6205846cd9
commit 4453aa0d29
4 changed files with 61 additions and 9 deletions

View File

@@ -10905,6 +10905,11 @@ static dict_T *get_win_info(win_T *wp, short tpnr, short winnr)
dict_add_nr_str(dict, "width", wp->w_width, NULL);
dict_add_nr_str(dict, "bufnum", wp->w_buffer->b_fnum, NULL);
dict_add_nr_str(dict, "quickfix", bt_quickfix(wp->w_buffer), NULL);
dict_add_nr_str(dict, "loclist",
(bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL),
NULL);
// Copy window variables
dict_T *vars = dict_copy(NULL, wp->w_vars, true, 0);
if (vars != NULL) {