Mercurial > vim
comparison src/evalwindow.c @ 18763:49b78d6465e5 v8.1.2371
patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Commit: https://github.com/vim/vim/commit/05ad5ff0ab34ed9a5296dedd420ca81698b8ce22
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 30 22:48:27 2019 +0100
patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Problem: FEAT_TEXT_PROP is a confusing name.
Solution: Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes https://github.com/vim/vim/issues/5291)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 Nov 2019 23:00:05 +0100 |
parents | f254dd2bc107 |
children | ef3633932b0c |
comparison
equal
deleted
inserted
replaced
18762:19582783e5ad | 18763:49b78d6465e5 |
---|---|
101 { | 101 { |
102 if (tpp != NULL) | 102 if (tpp != NULL) |
103 *tpp = tp; | 103 *tpp = tp; |
104 return wp; | 104 return wp; |
105 } | 105 } |
106 #ifdef FEAT_TEXT_PROP | 106 #ifdef FEAT_PROP_POPUP |
107 // popup windows are in separate lists | 107 // popup windows are in separate lists |
108 FOR_ALL_TABPAGES(tp) | 108 FOR_ALL_TABPAGES(tp) |
109 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) | 109 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) |
110 if (wp->w_id == id) | 110 if (wp->w_id == id) |
111 { | 111 { |
179 else if (--nr <= 0) | 179 else if (--nr <= 0) |
180 break; | 180 break; |
181 } | 181 } |
182 if (nr >= LOWEST_WIN_ID) | 182 if (nr >= LOWEST_WIN_ID) |
183 { | 183 { |
184 #ifdef FEAT_TEXT_PROP | 184 #ifdef FEAT_PROP_POPUP |
185 // check tab-local popup windows | 185 // check tab-local popup windows |
186 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) | 186 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) |
187 if (wp->w_id == nr) | 187 if (wp->w_id == nr) |
188 return wp; | 188 return wp; |
189 // check global popup windows | 189 // check global popup windows |
197 } | 197 } |
198 | 198 |
199 /* | 199 /* |
200 * Find a window: When using a Window ID in any tab page, when using a number | 200 * Find a window: When using a Window ID in any tab page, when using a number |
201 * in the current tab page. | 201 * in the current tab page. |
202 * Returns NULL when not found. | |
202 */ | 203 */ |
203 win_T * | 204 win_T * |
204 find_win_by_nr_or_id(typval_T *vp) | 205 find_win_by_nr_or_id(typval_T *vp) |
205 { | 206 { |
206 int nr = (int)tv_get_number_chk(vp, NULL); | 207 int nr = (int)tv_get_number_chk(vp, NULL); |
1135 if (win_valid(save_curwin)) | 1136 if (win_valid(save_curwin)) |
1136 { | 1137 { |
1137 curwin = save_curwin; | 1138 curwin = save_curwin; |
1138 curbuf = curwin->w_buffer; | 1139 curbuf = curwin->w_buffer; |
1139 } | 1140 } |
1140 # ifdef FEAT_TEXT_PROP | 1141 # ifdef FEAT_PROP_POPUP |
1141 else if (WIN_IS_POPUP(curwin)) | 1142 else if (WIN_IS_POPUP(curwin)) |
1142 // original window was closed and now we're in a popup window: Go | 1143 // original window was closed and now we're in a popup window: Go |
1143 // to the first valid window. | 1144 // to the first valid window. |
1144 win_goto(firstwin); | 1145 win_goto(firstwin); |
1145 # endif | 1146 # endif |