From c73a827564083b4dadb3a70468466306fb416d08 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 9 Apr 2025 07:40:55 +0800 Subject: vim-patch:9.1.1288: Using wrong window in ll_resize_stack() (#33397) Problem: Using wrong window in ll_resize_stack() (after v9.1.1287) Solution: Use "wp" instead of "curwin", even though they are always the same value. Fix typos in documentation (zeertzjq). closes: vim/vim#17080 https://github.com/vim/vim/commit/b71f1309a210bf8f61a24f4eda336de64c6f0a07 --- src/nvim/quickfix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/nvim/quickfix.c') diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 0e6b7b9ce4..e1ec8aab4f 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2011,9 +2011,9 @@ void qf_resize_stack(int n) /// Resize location list stack for window 'wp' to be able to hold n amount of lists. void ll_resize_stack(win_T *wp, int n) { - // check if current window is a location list window; + // check if given window is a location list window; // if so then sync its 'lhistory' to the parent window or vice versa - if (IS_LL_WINDOW(curwin)) { + if (IS_LL_WINDOW(wp)) { qf_sync_llw_to_win(wp); } else { qf_sync_win_to_llw(wp); @@ -2107,7 +2107,6 @@ static qf_info_T *qf_alloc_stack(qfltype_T qfltype, int n) } /// Allocate memory for qf_lists member of qf_info_T struct. -/// 'actual' is the actual amount of lists that have been allocated for static qf_list_T *qf_alloc_list_stack(int n) FUNC_ATTR_NONNULL_RET { -- cgit