Mercurial > vim
comparison src/screen.c @ 17117:7ef5283ace3c v8.1.1558
patch 8.1.1558: popup_menu() and popup_filter_menu() are not implemented yet
commit https://github.com/vim/vim/commit/a730e55cc2d3045a79a340a5af1ad4a749058a32
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 16 19:05:31 2019 +0200
patch 8.1.1558: popup_menu() and popup_filter_menu() are not implemented yet
Problem: Popup_menu() and popup_filter_menu() are not implemented yet.
Solution: Implement the functions. Fix that centering didn't take the border
and padding into account.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Jun 2019 19:15:05 +0200 |
parents | f4de7ccdfd8c |
children | 4fb68abc770f |
comparison
equal
deleted
inserted
replaced
17116:3cc7132b7a5c | 17117:7ef5283ace3c |
---|---|
4181 * Do this for 'search_hl' and the match list (ordered by | 4181 * Do this for 'search_hl' and the match list (ordered by |
4182 * priority). | 4182 * priority). |
4183 */ | 4183 */ |
4184 v = (long)(ptr - line); | 4184 v = (long)(ptr - line); |
4185 cur = wp->w_match_head; | 4185 cur = wp->w_match_head; |
4186 shl_flag = (screen_line_flags & SLF_POPUP); | 4186 shl_flag = FALSE; |
4187 while (cur != NULL || shl_flag == FALSE) | 4187 while (cur != NULL || shl_flag == FALSE) |
4188 { | 4188 { |
4189 if (shl_flag == FALSE | 4189 if (shl_flag == FALSE |
4190 && ((cur != NULL | 4190 && ((cur != NULL |
4191 && cur->priority > SEARCH_HL_PRIORITY) | 4191 && cur->priority > SEARCH_HL_PRIORITY) |
4192 || cur == NULL)) | 4192 || cur == NULL)) |
4193 { | 4193 { |
4194 shl = &search_hl; | 4194 shl = &search_hl; |
4195 shl_flag = TRUE; | 4195 shl_flag = TRUE; |
4196 if (screen_line_flags & SLF_POPUP) | |
4197 continue; // do not use search_hl | |
4196 } | 4198 } |
4197 else | 4199 else |
4198 shl = &cur->hl; | 4200 shl = &cur->hl; |
4199 if (cur != NULL) | 4201 if (cur != NULL) |
4200 cur->pos.cur = 0; | 4202 cur->pos.cur = 0; |
4270 cur = cur->next; | 4272 cur = cur->next; |
4271 } | 4273 } |
4272 | 4274 |
4273 /* Use attributes from match with highest priority among | 4275 /* Use attributes from match with highest priority among |
4274 * 'search_hl' and the match list. */ | 4276 * 'search_hl' and the match list. */ |
4275 search_attr = search_hl.attr_cur; | |
4276 cur = wp->w_match_head; | 4277 cur = wp->w_match_head; |
4277 shl_flag = FALSE; | 4278 shl_flag = FALSE; |
4279 search_attr = 0; | |
4278 while (cur != NULL || shl_flag == FALSE) | 4280 while (cur != NULL || shl_flag == FALSE) |
4279 { | 4281 { |
4280 if (shl_flag == FALSE | 4282 if (shl_flag == FALSE |
4281 && ((cur != NULL | 4283 && ((cur != NULL |
4282 && cur->priority > SEARCH_HL_PRIORITY) | 4284 && cur->priority > SEARCH_HL_PRIORITY) |
4283 || cur == NULL)) | 4285 || cur == NULL)) |
4284 { | 4286 { |
4285 shl = &search_hl; | 4287 shl = &search_hl; |
4286 shl_flag = TRUE; | 4288 shl_flag = TRUE; |
4289 if (screen_line_flags & SLF_POPUP) | |
4290 continue; // do not use search_hl | |
4287 } | 4291 } |
4288 else | 4292 else |
4289 shl = &cur->hl; | 4293 shl = &cur->hl; |
4290 if (shl->attr_cur != 0) | 4294 if (shl->attr_cur != 0) |
4291 search_attr = shl->attr_cur; | 4295 search_attr = shl->attr_cur; |
5562 #ifdef FEAT_SEARCH_EXTRA | 5566 #ifdef FEAT_SEARCH_EXTRA |
5563 if (area_attr == 0) | 5567 if (area_attr == 0) |
5564 { | 5568 { |
5565 /* Use attributes from match with highest priority among | 5569 /* Use attributes from match with highest priority among |
5566 * 'search_hl' and the match list. */ | 5570 * 'search_hl' and the match list. */ |
5567 char_attr = search_hl.attr; | |
5568 cur = wp->w_match_head; | 5571 cur = wp->w_match_head; |
5569 shl_flag = FALSE; | 5572 shl_flag = FALSE; |
5570 while (cur != NULL || shl_flag == FALSE) | 5573 while (cur != NULL || shl_flag == FALSE) |
5571 { | 5574 { |
5572 if (shl_flag == FALSE | 5575 if (shl_flag == FALSE |
5574 && cur->priority > SEARCH_HL_PRIORITY) | 5577 && cur->priority > SEARCH_HL_PRIORITY) |
5575 || cur == NULL)) | 5578 || cur == NULL)) |
5576 { | 5579 { |
5577 shl = &search_hl; | 5580 shl = &search_hl; |
5578 shl_flag = TRUE; | 5581 shl_flag = TRUE; |
5582 if (screen_line_flags & SLF_POPUP) | |
5583 continue; // do not use search_hl | |
5579 } | 5584 } |
5580 else | 5585 else |
5581 shl = &cur->hl; | 5586 shl = &cur->hl; |
5582 if ((ptr - line) - 1 == (long)shl->startcol | 5587 if ((ptr - line) - 1 == (long)shl->startcol |
5583 && (shl == &search_hl || !shl->is_addpos)) | 5588 && (shl == &search_hl || !shl->is_addpos)) |