Mercurial > vim
comparison src/quickfix.c @ 26458:824fe105f5b9 v8.2.3759
patch 8.2.3759: quickfix buffer becomes hidden while still in a window
Commit: https://github.com/vim/vim/commit/78a61068cf2c83e611d954a0fb413a09ad59dc07
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Wed Dec 8 20:03:31 2021 +0000
patch 8.2.3759: quickfix buffer becomes hidden while still in a window
Problem: Quickfix buffer becomes hidden while still in a window.
Solution: Check if the closed window is the last window showing the quickfix
buffer. (Yegappan Lakshmanan, closes #9303, closes #9300)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 Dec 2021 21:15:03 +0100 |
parents | baf0d27eb024 |
children | c0cb28384dc2 |
comparison
equal
deleted
inserted
replaced
26457:9b0883e8653c | 26458:824fe105f5b9 |
---|---|
2816 *new_qfidx = qfidx; | 2816 *new_qfidx = qfidx; |
2817 return qf_ptr; | 2817 return qf_ptr; |
2818 } | 2818 } |
2819 | 2819 |
2820 /* | 2820 /* |
2821 * Find a window displaying a Vim help file. | 2821 * Find a window displaying a Vim help file in the current tab page. |
2822 */ | 2822 */ |
2823 static win_T * | 2823 static win_T * |
2824 qf_find_help_win(void) | 2824 qf_find_help_win(void) |
2825 { | 2825 { |
2826 win_T *wp; | 2826 win_T *wp; |
2891 | 2891 |
2892 return OK; | 2892 return OK; |
2893 } | 2893 } |
2894 | 2894 |
2895 /* | 2895 /* |
2896 * Find a non-quickfix window in the current tabpage using the given location | 2896 * Find a non-quickfix window using the given location list stack in the |
2897 * list stack. | 2897 * current tabpage. |
2898 * Returns NULL if a matching window is not found. | 2898 * Returns NULL if a matching window is not found. |
2899 */ | 2899 */ |
2900 static win_T * | 2900 static win_T * |
2901 qf_find_win_with_loclist(qf_info_T *ll) | 2901 qf_find_win_with_loclist(qf_info_T *ll) |
2902 { | 2902 { |
2908 | 2908 |
2909 return NULL; | 2909 return NULL; |
2910 } | 2910 } |
2911 | 2911 |
2912 /* | 2912 /* |
2913 * Find a window containing a normal buffer | 2913 * Find a window containing a normal buffer in the current tab page. |
2914 */ | 2914 */ |
2915 static win_T * | 2915 static win_T * |
2916 qf_find_win_with_normal_buf(void) | 2916 qf_find_win_with_normal_buf(void) |
2917 { | 2917 { |
2918 win_T *wp; | 2918 win_T *wp; |
2979 { | 2979 { |
2980 win_T *win = use_win; | 2980 win_T *win = use_win; |
2981 | 2981 |
2982 if (win == NULL) | 2982 if (win == NULL) |
2983 { | 2983 { |
2984 // Find the window showing the selected file | 2984 // Find the window showing the selected file in the current tab page. |
2985 FOR_ALL_WINDOWS(win) | 2985 FOR_ALL_WINDOWS(win) |
2986 if (win->w_buffer->b_fnum == qf_fnum) | 2986 if (win->w_buffer->b_fnum == qf_fnum) |
2987 break; | 2987 break; |
2988 if (win == NULL) | 2988 if (win == NULL) |
2989 { | 2989 { |
4392 | 4392 |
4393 return FALSE; | 4393 return FALSE; |
4394 } | 4394 } |
4395 | 4395 |
4396 /* | 4396 /* |
4397 * Find a window displaying the quickfix/location stack 'qi' | 4397 * Find a window displaying the quickfix/location stack 'qi' in the current tab |
4398 * Only searches in the current tabpage. | 4398 * page. |
4399 */ | 4399 */ |
4400 static win_T * | 4400 static win_T * |
4401 qf_find_win(qf_info_T *qi) | 4401 qf_find_win(qf_info_T *qi) |
4402 { | 4402 { |
4403 win_T *win; | 4403 win_T *win; |
4408 return NULL; | 4408 return NULL; |
4409 } | 4409 } |
4410 | 4410 |
4411 /* | 4411 /* |
4412 * Find a quickfix buffer. | 4412 * Find a quickfix buffer. |
4413 * Searches in windows opened in all the tabs. | 4413 * Searches in windows opened in all the tab pages. |
4414 */ | 4414 */ |
4415 static buf_T * | 4415 static buf_T * |
4416 qf_find_buf(qf_info_T *qi) | 4416 qf_find_buf(qf_info_T *qi) |
4417 { | 4417 { |
4418 tabpage_T *tp; | 4418 tabpage_T *tp; |