Mercurial > vim
comparison src/screen.c @ 16839:032d5335987e v8.1.1421
patch 8.1.1421: drawing "~" line in popup window
commit https://github.com/vim/vim/commit/1714696600f2859f897f4ffb33cedb5de09eded3
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 30 00:12:11 2019 +0200
patch 8.1.1421: drawing "~" line in popup window
Problem: Drawing "~" line in popup window.
Solution: Just draw text in the last line of the popup window.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 May 2019 00:15:05 +0200 |
parents | 7cade95272c4 |
children | 998603a243d7 |
comparison
equal
deleted
inserted
replaced
16838:2185324ec26b | 16839:032d5335987e |
---|---|
1028 lowest_wp = wp; | 1028 lowest_wp = wp; |
1029 } | 1029 } |
1030 | 1030 |
1031 if (lowest_wp == NULL) | 1031 if (lowest_wp == NULL) |
1032 break; | 1032 break; |
1033 | |
1034 // Recompute the position if the text changed. | |
1035 if (lowest_wp->w_popup_last_changedtick | |
1036 != CHANGEDTICK(lowest_wp->w_buffer)) | |
1037 popup_adjust_position(lowest_wp); | |
1038 | |
1033 win_update(lowest_wp); | 1039 win_update(lowest_wp); |
1034 lowest_wp->w_popup_flags |= POPF_REDRAWN; | 1040 lowest_wp->w_popup_flags |= POPF_REDRAWN; |
1035 } | 1041 } |
1036 } | 1042 } |
1037 #endif | 1043 #endif |
2117 if (idx < wp->w_lines_valid | 2123 if (idx < wp->w_lines_valid |
2118 && wp->w_lines[idx].wl_valid | 2124 && wp->w_lines[idx].wl_valid |
2119 && wp->w_lines[idx].wl_lnum == lnum | 2125 && wp->w_lines[idx].wl_lnum == lnum |
2120 && lnum > wp->w_topline | 2126 && lnum > wp->w_topline |
2121 && !(dy_flags & (DY_LASTLINE | DY_TRUNCATE)) | 2127 && !(dy_flags & (DY_LASTLINE | DY_TRUNCATE)) |
2128 #ifdef FEAT_TEXT_PROP | |
2129 && !bt_popup(wp->w_buffer) | |
2130 #endif | |
2122 && srow + wp->w_lines[idx].wl_size > wp->w_height | 2131 && srow + wp->w_lines[idx].wl_size > wp->w_height |
2123 #ifdef FEAT_DIFF | 2132 #ifdef FEAT_DIFF |
2124 && diff_check_fill(wp, lnum) == 0 | 2133 && diff_check_fill(wp, lnum) == 0 |
2125 #endif | 2134 #endif |
2126 ) | 2135 ) |
2270 else if (diff_check_fill(wp, lnum) >= wp->w_height - srow) | 2279 else if (diff_check_fill(wp, lnum) >= wp->w_height - srow) |
2271 { | 2280 { |
2272 /* Window ends in filler lines. */ | 2281 /* Window ends in filler lines. */ |
2273 wp->w_botline = lnum; | 2282 wp->w_botline = lnum; |
2274 wp->w_filler_rows = wp->w_height - srow; | 2283 wp->w_filler_rows = wp->w_height - srow; |
2284 } | |
2285 #endif | |
2286 #ifdef FEAT_TEXT_PROP | |
2287 else if (bt_popup(wp->w_buffer)) | |
2288 { | |
2289 // popup line that doesn't fit is left as-is | |
2290 wp->w_botline = lnum; | |
2275 } | 2291 } |
2276 #endif | 2292 #endif |
2277 else if (dy_flags & DY_TRUNCATE) /* 'display' has "truncate" */ | 2293 else if (dy_flags & DY_TRUNCATE) /* 'display' has "truncate" */ |
2278 { | 2294 { |
2279 int scr_row = W_WINROW(wp) + wp->w_height - 1; | 2295 int scr_row = W_WINROW(wp) + wp->w_height - 1; |
2332 else if (dollar_vcol == -1) | 2348 else if (dollar_vcol == -1) |
2333 wp->w_botline = lnum; | 2349 wp->w_botline = lnum; |
2334 | 2350 |
2335 // Make sure the rest of the screen is blank | 2351 // Make sure the rest of the screen is blank |
2336 // put '~'s on rows that aren't part of the file. | 2352 // put '~'s on rows that aren't part of the file. |
2337 win_draw_end(wp, '~', ' ', FALSE, row, wp->w_height, HLF_EOB); | 2353 win_draw_end(wp, |
2354 #ifdef FEAT_TEXT_PROP | |
2355 bt_popup(wp->w_buffer) ? ' ' : | |
2356 #endif | |
2357 '~', ' ', FALSE, row, wp->w_height, HLF_EOB); | |
2338 } | 2358 } |
2339 | 2359 |
2340 #ifdef SYN_TIME_LIMIT | 2360 #ifdef SYN_TIME_LIMIT |
2341 syn_set_timeout(NULL); | 2361 syn_set_timeout(NULL); |
2342 #endif | 2362 #endif |