summaryrefslogtreecommitdiff
path: root/src/popupwin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-12 18:18:06 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-12 18:18:06 +0100
commit3ae50c775c00b098cdfc9e90b17c4cc07f00e08d (patch)
treeacfbf0e1eed648c5656517dea61bfa941877d591 /src/popupwin.c
parent709664cca0b59b69caa1ed40ebfcf00b2c672693 (diff)
downloadvim-git-3ae50c775c00b098cdfc9e90b17c4cc07f00e08d.tar.gz
patch 8.2.2132: padding not drawn properly for popup window with titlev8.2.2132
Problem: Padding not drawn properly for popup window with title. Solution: Draw the padding below the title. (closes #7460)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r--src/popupwin.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index cfd2050d3..13a455d4e 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3868,20 +3868,19 @@ update_popups(void (*win_update)(win_T *wp))
}
if (top_padding > 0)
{
- // top padding; do not draw over the title
row = wp->w_winrow + wp->w_popup_border[0];
- if (title_len > 0)
+ if (title_len > 0 && row == wp->w_winrow)
{
- screen_fill(row, row + top_padding, padcol, title_wincol,
+ // top padding and no border; do not draw over the title
+ screen_fill(row, row + 1, padcol, title_wincol,
' ', ' ', popup_attr);
- screen_fill(row, row + top_padding, title_wincol + title_len,
+ screen_fill(row, row + 1, title_wincol + title_len,
padendcol, ' ', ' ', popup_attr);
+ row += 1;
+ top_padding -= 1;
}
- else
- {
- screen_fill(row, row + top_padding, padcol, padendcol,
+ screen_fill(row, row + top_padding, padcol, padendcol,
' ', ' ', popup_attr);
- }
}
// Compute scrollbar thumb position and size.