Mercurial > vim
comparison src/window.c @ 22900:2c1520981e63 v8.2.1997
patch 8.2.1997: window changes when using bufload() while in a terminal popup
Commit: https://github.com/vim/vim/commit/8adc8d9b73121b647476a33d91d31d25e1c2d987
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 16 20:47:31 2020 +0100
patch 8.2.1997: window changes when using bufload() while in a terminal popup
Problem: Window changes when using bufload() while in a terminal popup.
Solution: When searching for a window by ID also find a popup window.
(closes #7307)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 16 Nov 2020 21:00:04 +0100 |
parents | 80bd5de5dcab |
children | 3105546b941f |
comparison
equal
deleted
inserted
replaced
22899:66c1cf9b82e0 | 22900:2c1520981e63 |
---|---|
1460 return win_valid_popup(win); | 1460 return win_valid_popup(win); |
1461 } | 1461 } |
1462 | 1462 |
1463 /* | 1463 /* |
1464 * Find window "id" in the current tab page. | 1464 * Find window "id" in the current tab page. |
1465 * Also find popup windows. | |
1465 * Return NULL if not found. | 1466 * Return NULL if not found. |
1466 */ | 1467 */ |
1467 win_T * | 1468 win_T * |
1468 win_find_by_id(int id) | 1469 win_find_by_id(int id) |
1469 { | 1470 { |
1470 win_T *wp; | 1471 win_T *wp; |
1471 | 1472 |
1472 FOR_ALL_WINDOWS(wp) | 1473 FOR_ALL_WINDOWS(wp) |
1473 if (wp->w_id == id) | 1474 if (wp->w_id == id) |
1474 return wp; | 1475 return wp; |
1476 #ifdef FEAT_PROP_POPUP | |
1477 FOR_ALL_POPUPWINS(wp) | |
1478 if (wp->w_id == id) | |
1479 return wp; | |
1480 FOR_ALL_POPUPWINS_IN_TAB(curtab, wp) | |
1481 if (wp->w_id == id) | |
1482 return wp; | |
1483 #endif | |
1475 return NULL; | 1484 return NULL; |
1476 } | 1485 } |
1477 | 1486 |
1478 /* | 1487 /* |
1479 * Check if "win" is a pointer to an existing window in any tab page. | 1488 * Check if "win" is a pointer to an existing window in any tab page. |