mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.1617: no test for popup window with mask and position fixed
Problem: No test for popup window with mask and position fixed. Solution: Add a couple of screenshots. Fix deteced problems.
This commit is contained in:
159
src/popupwin.c
159
src/popupwin.c
@@ -699,29 +699,6 @@ add_popup_dicts(buf_T *buf, list_T *l)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Return the height of popup window "wp", including border and padding.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
popup_height(win_T *wp)
|
|
||||||
{
|
|
||||||
return wp->w_height
|
|
||||||
+ wp->w_popup_padding[0] + wp->w_popup_border[0]
|
|
||||||
+ wp->w_popup_padding[2] + wp->w_popup_border[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Return the width of popup window "wp", including border and padding.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
popup_width(win_T *wp)
|
|
||||||
{
|
|
||||||
return wp->w_width
|
|
||||||
+ wp->w_popup_padding[3] + wp->w_popup_border[3]
|
|
||||||
+ wp->w_popup_padding[1] + wp->w_popup_border[1]
|
|
||||||
+ wp->w_has_scrollbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the padding plus border at the top, adjusted to 1 if there is a title.
|
* Get the padding plus border at the top, adjusted to 1 if there is a title.
|
||||||
*/
|
*/
|
||||||
@@ -735,6 +712,31 @@ popup_top_extra(win_T *wp)
|
|||||||
return extra;
|
return extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the height of popup window "wp", including border and padding.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
popup_height(win_T *wp)
|
||||||
|
{
|
||||||
|
return wp->w_height
|
||||||
|
+ popup_top_extra(wp)
|
||||||
|
+ wp->w_popup_padding[2] + wp->w_popup_border[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the width of popup window "wp", including border, padding and
|
||||||
|
* scrollbar.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
popup_width(win_T *wp)
|
||||||
|
{
|
||||||
|
return wp->w_width + wp->w_leftcol
|
||||||
|
+ wp->w_popup_padding[3] + wp->w_popup_border[3]
|
||||||
|
+ wp->w_popup_padding[1] + wp->w_popup_border[1]
|
||||||
|
+ wp->w_has_scrollbar
|
||||||
|
+ wp->w_popup_rightoff;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adjust the position and size of the popup to fit on the screen.
|
* Adjust the position and size of the popup to fit on the screen.
|
||||||
*/
|
*/
|
||||||
@@ -744,6 +746,7 @@ popup_adjust_position(win_T *wp)
|
|||||||
linenr_T lnum;
|
linenr_T lnum;
|
||||||
int wrapped = 0;
|
int wrapped = 0;
|
||||||
int maxwidth;
|
int maxwidth;
|
||||||
|
int maxspace;
|
||||||
int center_vert = FALSE;
|
int center_vert = FALSE;
|
||||||
int center_hor = FALSE;
|
int center_hor = FALSE;
|
||||||
int allow_adjust_left = !wp->w_popup_fixed;
|
int allow_adjust_left = !wp->w_popup_fixed;
|
||||||
@@ -758,11 +761,14 @@ popup_adjust_position(win_T *wp)
|
|||||||
int org_width = wp->w_width;
|
int org_width = wp->w_width;
|
||||||
int org_height = wp->w_height;
|
int org_height = wp->w_height;
|
||||||
int org_leftcol = wp->w_leftcol;
|
int org_leftcol = wp->w_leftcol;
|
||||||
|
int org_leftoff = wp->w_popup_leftoff;
|
||||||
int minwidth;
|
int minwidth;
|
||||||
|
|
||||||
wp->w_winrow = 0;
|
wp->w_winrow = 0;
|
||||||
wp->w_wincol = 0;
|
wp->w_wincol = 0;
|
||||||
wp->w_leftcol = 0;
|
wp->w_leftcol = 0;
|
||||||
|
wp->w_popup_leftoff = 0;
|
||||||
|
wp->w_popup_rightoff = 0;
|
||||||
if (wp->w_popup_pos == POPPOS_CENTER)
|
if (wp->w_popup_pos == POPPOS_CENTER)
|
||||||
{
|
{
|
||||||
// center after computing the size
|
// center after computing the size
|
||||||
@@ -795,7 +801,8 @@ popup_adjust_position(win_T *wp)
|
|||||||
// When centering or right aligned, use maximum width.
|
// When centering or right aligned, use maximum width.
|
||||||
// When left aligned use the space available, but shift to the left when we
|
// When left aligned use the space available, but shift to the left when we
|
||||||
// hit the right of the screen.
|
// hit the right of the screen.
|
||||||
maxwidth = Columns - wp->w_wincol - left_extra;
|
maxspace = Columns - wp->w_wincol - left_extra;
|
||||||
|
maxwidth = maxspace;
|
||||||
if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
|
if (wp->w_maxwidth > 0 && maxwidth > wp->w_maxwidth)
|
||||||
{
|
{
|
||||||
allow_adjust_left = FALSE;
|
allow_adjust_left = FALSE;
|
||||||
@@ -868,7 +875,12 @@ popup_adjust_position(win_T *wp)
|
|||||||
if (minwidth > 0 && wp->w_width < minwidth)
|
if (minwidth > 0 && wp->w_width < minwidth)
|
||||||
wp->w_width = minwidth;
|
wp->w_width = minwidth;
|
||||||
if (wp->w_width > maxwidth)
|
if (wp->w_width > maxwidth)
|
||||||
|
{
|
||||||
|
if (wp->w_width > maxspace)
|
||||||
|
// some columns cut off on the right
|
||||||
|
wp->w_popup_rightoff = wp->w_width - maxspace;
|
||||||
wp->w_width = maxwidth;
|
wp->w_width = maxwidth;
|
||||||
|
}
|
||||||
if (center_hor)
|
if (center_hor)
|
||||||
{
|
{
|
||||||
wp->w_wincol = (Columns - wp->w_width - extra_width) / 2;
|
wp->w_wincol = (Columns - wp->w_width - extra_width) / 2;
|
||||||
@@ -887,9 +899,12 @@ popup_adjust_position(win_T *wp)
|
|||||||
else if (wp->w_popup_fixed)
|
else if (wp->w_popup_fixed)
|
||||||
{
|
{
|
||||||
// "col" specifies the right edge, but popup doesn't fit, skip some
|
// "col" specifies the right edge, but popup doesn't fit, skip some
|
||||||
// columns when displaying the window.
|
// columns when displaying the window, minus left border and
|
||||||
wp->w_leftcol = -leftoff;
|
// padding.
|
||||||
wp->w_width += leftoff;
|
if (-leftoff > left_extra)
|
||||||
|
wp->w_leftcol = -leftoff - left_extra;
|
||||||
|
wp->w_width -= wp->w_leftcol;
|
||||||
|
wp->w_popup_leftoff = -leftoff;
|
||||||
if (wp->w_width < 0)
|
if (wp->w_width < 0)
|
||||||
wp->w_width = 0;
|
wp->w_width = 0;
|
||||||
}
|
}
|
||||||
@@ -928,6 +943,7 @@ popup_adjust_position(win_T *wp)
|
|||||||
if (org_winrow != wp->w_winrow
|
if (org_winrow != wp->w_winrow
|
||||||
|| org_wincol != wp->w_wincol
|
|| org_wincol != wp->w_wincol
|
||||||
|| org_leftcol != wp->w_leftcol
|
|| org_leftcol != wp->w_leftcol
|
||||||
|
|| org_leftoff != wp->w_popup_leftoff
|
||||||
|| org_width != wp->w_width
|
|| org_width != wp->w_width
|
||||||
|| org_height != wp->w_height)
|
|| org_height != wp->w_height)
|
||||||
{
|
{
|
||||||
@@ -2066,7 +2082,7 @@ popup_check_cursor_pos()
|
|||||||
static int
|
static int
|
||||||
popup_masked(win_T *wp, int screencol, int screenline)
|
popup_masked(win_T *wp, int screencol, int screenline)
|
||||||
{
|
{
|
||||||
int col = screencol - wp->w_wincol + 1 + wp->w_leftcol;
|
int col = screencol - wp->w_wincol + 1 + wp->w_popup_leftoff;
|
||||||
int line = screenline - wp->w_winrow + 1;
|
int line = screenline - wp->w_winrow + 1;
|
||||||
listitem_T *lio, *li;
|
listitem_T *lio, *li;
|
||||||
int width, height;
|
int width, height;
|
||||||
@@ -2145,10 +2161,10 @@ update_popup_transparent(win_T *wp, int val)
|
|||||||
linee = height + linee + 1;
|
linee = height + linee + 1;
|
||||||
|
|
||||||
--cols;
|
--cols;
|
||||||
cols -= wp->w_leftcol;
|
cols -= wp->w_popup_leftoff;
|
||||||
if (cols < 0)
|
if (cols < 0)
|
||||||
cols = 0;
|
cols = 0;
|
||||||
cole -= wp->w_leftcol;
|
cole -= wp->w_popup_leftoff;
|
||||||
--lines;
|
--lines;
|
||||||
if (lines < 0)
|
if (lines < 0)
|
||||||
lines = 0;
|
lines = 0;
|
||||||
@@ -2215,8 +2231,8 @@ may_update_popup_mask(int type)
|
|||||||
popup_reset_handled();
|
popup_reset_handled();
|
||||||
while ((wp = find_next_popup(TRUE)) != NULL)
|
while ((wp = find_next_popup(TRUE)) != NULL)
|
||||||
{
|
{
|
||||||
int height = popup_height(wp);
|
int height;
|
||||||
int width = popup_width(wp);
|
int width;
|
||||||
|
|
||||||
popup_visible = TRUE;
|
popup_visible = TRUE;
|
||||||
|
|
||||||
@@ -2225,6 +2241,8 @@ may_update_popup_mask(int type)
|
|||||||
|| wp->w_popup_last_changedtick != CHANGEDTICK(wp->w_buffer))
|
|| wp->w_popup_last_changedtick != CHANGEDTICK(wp->w_buffer))
|
||||||
popup_adjust_position(wp);
|
popup_adjust_position(wp);
|
||||||
|
|
||||||
|
height = popup_height(wp);
|
||||||
|
width = popup_width(wp) - wp->w_popup_leftoff;
|
||||||
for (line = wp->w_winrow;
|
for (line = wp->w_winrow;
|
||||||
line < wp->w_winrow + height && line < screen_Rows; ++line)
|
line < wp->w_winrow + height && line < screen_Rows; ++line)
|
||||||
for (col = wp->w_wincol;
|
for (col = wp->w_wincol;
|
||||||
@@ -2310,7 +2328,7 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
{
|
{
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
int top_off;
|
int top_off;
|
||||||
int left_off;
|
int left_extra;
|
||||||
int total_width;
|
int total_width;
|
||||||
int total_height;
|
int total_height;
|
||||||
int top_padding;
|
int top_padding;
|
||||||
@@ -2319,6 +2337,8 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
int border_char[8];
|
int border_char[8];
|
||||||
char_u buf[MB_MAXBYTES];
|
char_u buf[MB_MAXBYTES];
|
||||||
int row;
|
int row;
|
||||||
|
int padcol = 0;
|
||||||
|
int padwidth = 0;
|
||||||
int i;
|
int i;
|
||||||
int sb_thumb_top = 0;
|
int sb_thumb_top = 0;
|
||||||
int sb_thumb_height = 0;
|
int sb_thumb_height = 0;
|
||||||
@@ -2342,22 +2362,22 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
// adjust w_winrow and w_wincol for border and padding, since
|
// adjust w_winrow and w_wincol for border and padding, since
|
||||||
// win_update() doesn't handle them.
|
// win_update() doesn't handle them.
|
||||||
top_off = popup_top_extra(wp);
|
top_off = popup_top_extra(wp);
|
||||||
left_off = wp->w_popup_padding[3] + wp->w_popup_border[3];
|
left_extra = wp->w_popup_padding[3] + wp->w_popup_border[3]
|
||||||
|
- wp->w_popup_leftoff;
|
||||||
|
if (wp->w_wincol + left_extra < 0)
|
||||||
|
left_extra = -wp->w_wincol;
|
||||||
wp->w_winrow += top_off;
|
wp->w_winrow += top_off;
|
||||||
wp->w_wincol += left_off;
|
wp->w_wincol += left_extra;
|
||||||
|
|
||||||
// Draw the popup text, unless it's off screen.
|
// Draw the popup text, unless it's off screen.
|
||||||
if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns)
|
if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns)
|
||||||
win_update(wp);
|
win_update(wp);
|
||||||
|
|
||||||
wp->w_winrow -= top_off;
|
wp->w_winrow -= top_off;
|
||||||
wp->w_wincol -= left_off;
|
wp->w_wincol -= left_extra;
|
||||||
|
|
||||||
total_width = wp->w_popup_border[3] + wp->w_popup_padding[3]
|
total_width = popup_width(wp);
|
||||||
+ wp->w_width + wp->w_popup_padding[1] + wp->w_popup_border[1]
|
total_height = popup_height(wp);
|
||||||
+ wp->w_has_scrollbar;
|
|
||||||
total_height = popup_top_extra(wp)
|
|
||||||
+ wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
|
|
||||||
popup_attr = get_wcr_attr(wp);
|
popup_attr = get_wcr_attr(wp);
|
||||||
|
|
||||||
// We can only use these line drawing characters when 'encoding' is
|
// We can only use these line drawing characters when 'encoding' is
|
||||||
@@ -2409,14 +2429,22 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
else if (wp->w_popup_padding[0] == 0 && popup_top_extra(wp) > 0)
|
else if (wp->w_popup_padding[0] == 0 && popup_top_extra(wp) > 0)
|
||||||
top_padding = 1;
|
top_padding = 1;
|
||||||
|
|
||||||
|
if (top_padding > 0 || wp->w_popup_padding[2] > 0)
|
||||||
|
{
|
||||||
|
padcol = wp->w_wincol - wp->w_popup_leftoff + wp->w_popup_border[3];
|
||||||
|
padwidth = wp->w_wincol + total_width - wp->w_popup_border[1]
|
||||||
|
- wp->w_has_scrollbar;
|
||||||
|
if (padcol < 0)
|
||||||
|
{
|
||||||
|
padwidth += padcol;
|
||||||
|
padcol = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (top_padding > 0)
|
if (top_padding > 0)
|
||||||
{
|
{
|
||||||
// top padding
|
// top padding
|
||||||
row = wp->w_winrow + wp->w_popup_border[0];
|
row = wp->w_winrow + wp->w_popup_border[0];
|
||||||
screen_fill(row, row + top_padding,
|
screen_fill(row, row + top_padding, padcol, padwidth,
|
||||||
wp->w_wincol + wp->w_popup_border[3],
|
|
||||||
wp->w_wincol + total_width - wp->w_popup_border[1]
|
|
||||||
- wp->w_has_scrollbar,
|
|
||||||
' ', ' ', popup_attr);
|
' ', ' ', popup_attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2450,18 +2478,35 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
for (i = wp->w_popup_border[0];
|
for (i = wp->w_popup_border[0];
|
||||||
i < total_height - wp->w_popup_border[2]; ++i)
|
i < total_height - wp->w_popup_border[2]; ++i)
|
||||||
{
|
{
|
||||||
|
int pad_left;
|
||||||
|
int col = wp->w_wincol - wp->w_popup_leftoff;
|
||||||
|
// left and right padding only needed next to the body
|
||||||
|
int do_padding =
|
||||||
|
i >= wp->w_popup_border[0] + wp->w_popup_padding[0]
|
||||||
|
&& i < total_height - wp->w_popup_border[2]
|
||||||
|
- wp->w_popup_padding[2];
|
||||||
|
|
||||||
row = wp->w_winrow + i;
|
row = wp->w_winrow + i;
|
||||||
|
|
||||||
// left border
|
// left border
|
||||||
if (wp->w_popup_border[3] > 0)
|
if (wp->w_popup_border[3] > 0 && col >= 0)
|
||||||
{
|
{
|
||||||
buf[mb_char2bytes(border_char[3], buf)] = NUL;
|
buf[mb_char2bytes(border_char[3], buf)] = NUL;
|
||||||
screen_puts(buf, row, wp->w_wincol, border_attr[3]);
|
screen_puts(buf, row, col, border_attr[3]);
|
||||||
|
}
|
||||||
|
if (do_padding && wp->w_popup_padding[3] > 0)
|
||||||
|
{
|
||||||
|
// left padding
|
||||||
|
col += wp->w_popup_border[3];
|
||||||
|
pad_left = wp->w_popup_padding[3];
|
||||||
|
if (col < 0)
|
||||||
|
{
|
||||||
|
pad_left += col;
|
||||||
|
col = 0;
|
||||||
|
}
|
||||||
|
if (pad_left > 0)
|
||||||
|
screen_puts(get_spaces(pad_left), row, col, popup_attr);
|
||||||
}
|
}
|
||||||
// left padding
|
|
||||||
if (wp->w_popup_padding[3] > 0)
|
|
||||||
screen_puts(get_spaces(wp->w_popup_padding[3]), row,
|
|
||||||
wp->w_wincol + wp->w_popup_border[3], popup_attr);
|
|
||||||
// scrollbar
|
// scrollbar
|
||||||
if (wp->w_has_scrollbar)
|
if (wp->w_has_scrollbar)
|
||||||
{
|
{
|
||||||
@@ -2485,10 +2530,12 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
wp->w_wincol + total_width - 1, border_attr[1]);
|
wp->w_wincol + total_width - 1, border_attr[1]);
|
||||||
}
|
}
|
||||||
// right padding
|
// right padding
|
||||||
if (wp->w_popup_padding[1] > 0)
|
if (do_padding && wp->w_popup_padding[1] > 0)
|
||||||
screen_puts(get_spaces(wp->w_popup_padding[1]), row,
|
screen_puts(get_spaces(wp->w_popup_padding[1]), row,
|
||||||
wp->w_wincol + wp->w_popup_border[3]
|
wp->w_wincol - wp->w_popup_leftoff
|
||||||
+ wp->w_popup_padding[3] + wp->w_width, popup_attr);
|
+ wp->w_popup_border[3]
|
||||||
|
+ wp->w_popup_padding[3] + wp->w_width + wp->w_leftcol,
|
||||||
|
popup_attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wp->w_popup_padding[2] > 0)
|
if (wp->w_popup_padding[2] > 0)
|
||||||
@@ -2497,9 +2544,7 @@ update_popups(void (*win_update)(win_T *wp))
|
|||||||
row = wp->w_winrow + wp->w_popup_border[0]
|
row = wp->w_winrow + wp->w_popup_border[0]
|
||||||
+ wp->w_popup_padding[0] + wp->w_height;
|
+ wp->w_popup_padding[0] + wp->w_height;
|
||||||
screen_fill(row, row + wp->w_popup_padding[2],
|
screen_fill(row, row + wp->w_popup_padding[2],
|
||||||
wp->w_wincol + wp->w_popup_border[3],
|
padcol, padwidth, ' ', ' ', popup_attr);
|
||||||
wp->w_wincol + total_width - wp->w_popup_border[1],
|
|
||||||
' ', ' ', popup_attr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wp->w_popup_border[2] > 0)
|
if (wp->w_popup_border[2] > 0)
|
||||||
|
@@ -2916,6 +2916,9 @@ struct window_S
|
|||||||
int w_popup_border[4]; // popup border top/right/bot/left
|
int w_popup_border[4]; // popup border top/right/bot/left
|
||||||
char_u *w_border_highlight[4]; // popup border highlight
|
char_u *w_border_highlight[4]; // popup border highlight
|
||||||
int w_border_char[8]; // popup border characters
|
int w_border_char[8]; // popup border characters
|
||||||
|
|
||||||
|
int w_popup_leftoff; // columns left of the screen
|
||||||
|
int w_popup_rightoff; // columns right of the screen
|
||||||
varnumber_T w_popup_last_changedtick; // b:changedtick when position was
|
varnumber_T w_popup_last_changedtick; // b:changedtick when position was
|
||||||
// computed
|
// computed
|
||||||
callback_T w_close_cb; // popup close callback
|
callback_T w_close_cb; // popup close callback
|
||||||
@@ -2927,8 +2930,8 @@ struct window_S
|
|||||||
colnr_T w_popup_maxcol; // close popup if cursor after this col
|
colnr_T w_popup_maxcol; // close popup if cursor after this col
|
||||||
int w_popup_drag; // allow moving the popup with the mouse
|
int w_popup_drag; // allow moving the popup with the mouse
|
||||||
popclose_T w_popup_close; // allow closing the popup with the mouse
|
popclose_T w_popup_close; // allow closing the popup with the mouse
|
||||||
list_T *w_popup_mask; // list of lists for "mask"
|
|
||||||
|
|
||||||
|
list_T *w_popup_mask; // list of lists for "mask"
|
||||||
# if defined(FEAT_TIMERS)
|
# if defined(FEAT_TIMERS)
|
||||||
timer_T *w_popup_timer; // timer for closing popup window
|
timer_T *w_popup_timer; // timer for closing popup window
|
||||||
# endif
|
# endif
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
>1+0&#ffffff0|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
>1+0&#ffffff0|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08@12|1+0&#ffffff0|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08@12|1+0&#ffffff0|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9| +0&#e0e0e08|s|o|m|e| |1+0&#ffffff0|3|x+0#0000001#ffd7ff255|t+0#0000000#e0e0e08| @3|x+0#0000001#ffd7ff255@2|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
|1|2|3|4|5|6|7|8|9| +0&#e0e0e08|s|o|m|e| |1+0&#ffffff0|3|x+0#0000001#ffd7ff255|t+0#0000000#e0e0e08| @3|x+0#0000001#ffd7ff255@2|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9| +0&#e0e0e08|0+0&#ffffff0|1@1|t+0&#e0e0e08|h|1+0&#ffffff0|3|y+0#0000001#ffd7ff255|l+0#0000000#e0e0e08|i|n|e| |y+0#0000001#ffd7ff255@2|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
|1|2|3|4|5|6|7|8|9| +0&#e0e0e08|0+0&#ffffff0|1@1|t+0&#e0e0e08|h|1+0&#ffffff0|3|y+0#0000001#ffd7ff255|l+0#0000000#e0e0e08|i|n|e| |y+0#0000001#ffd7ff255@2|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9| +0&#e0e0e08@8|4+0&#ffffff0|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
|1|2|3|4|5|6|7|8|9| +0&#e0e0e08@8|4+0&#ffffff0|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|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0| +0&#e0e0e08@12|x+0#0000001#ffd7ff255@1|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08|s|o|m|e| |3+0&#ffffff0|y+0#0000001#ffd7ff255@1|t+0#0000000#e0e0e08| @3|y+0#0000001#ffd7ff255@1|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08|s|o|m|e| |3+0&#ffffff0|y+0#0000001#ffd7ff255@1|t+0#0000000#e0e0e08| @3|y+0#0000001#ffd7ff255@1|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08|1+0&#ffffff0@2|t+0&#e0e0e08|h|3+0&#ffffff0|1|4|l+0&#e0e0e08|i|n|e| |7+0&#ffffff0|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0| @3
|
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08|1+0&#ffffff0@2|t+0&#e0e0e08|h|3+0&#ffffff0|1|4|l+0&#e0e0e08|i|n|e| |7+0&#ffffff0|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|1|2|3|4|5|6|7|8|9|1| +0&#e0e0e08@8|1+0&#ffffff0|5|1|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|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|:|c|a|l@1| |p|o|p|u|p|_|m|o|v|e|(|w|i|n|i|d|,| |{|'|c|o|l|'|:| |1@1|,| |'|l|i|n|e|'|:| |3|}|)| @9|1|,|1| @10|T|o|p|
|
|:|c|a|l@1| |p|o|p|u|p|_|m|o|v|e|(|w|i|n|i|d|,| |{|'|c|o|l|'|:| |1@1|,| |'|l|i|n|e|'|:| |3|}|)| @9|1|,|1| @10|T|o|p|
|
||||||
|
10
src/testdir/dumps/Test_popupwin_mask_3.dump
Normal file
10
src/testdir/dumps/Test_popupwin_mask_3.dump
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
>1+0&#ffffff0|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|x+0#0000001#ffd7ff255@8|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7| +0&#e0e0e08@9
|
||||||
|
|1+0&#ffffff0|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|y+0#0000001#ffd7ff255@8|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3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10
src/testdir/dumps/Test_popupwin_mask_4.dump
Normal file
10
src/testdir/dumps/Test_popupwin_mask_4.dump
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
>1+0&#ffffff0|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
| +0&#e0e0e08@11|1+0&#ffffff0@1|2|1|3|x+0#0000001#ffd7ff255@8|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|o+0&#e0e0e08|m|e| |5+0&#ffffff0|6|7|t+0&#e0e0e08| @3|1+0&#ffffff0@1|2|1|3|y+0#0000001#ffd7ff255@8|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|t+0&#e0e0e08|h|5+0&#ffffff0|6|7|l+0&#e0e0e08|i|n|e| |1+0&#ffffff0@1|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
| +0&#e0e0e08@6|8+0&#ffffff0|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|
||||||
|
|:|c|a|l@1| |p|o|p|u|p|_|m|o|v|e|(|w|i|n|i|d|,| |{|'|p|o|s|'|:| |'|t|o|p|r|i|g|h|t|'|,| |'|c|o|l|'|:| |1|2|,| |'|l|1|,|1| @10|T|o|p|
|
@@ -427,7 +427,7 @@ func Test_popup_with_mask()
|
|||||||
throw 'Skipped: cannot make screendumps'
|
throw 'Skipped: cannot make screendumps'
|
||||||
endif
|
endif
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
call setline(1, repeat([join(range(1, 40), '')], 10))
|
call setline(1, repeat([join(range(1, 42), '')], 10))
|
||||||
hi PopupColor ctermbg=lightgrey
|
hi PopupColor ctermbg=lightgrey
|
||||||
let winid = popup_create([
|
let winid = popup_create([
|
||||||
\ 'some text',
|
\ 'some text',
|
||||||
@@ -435,6 +435,8 @@ func Test_popup_with_mask()
|
|||||||
\], {
|
\], {
|
||||||
\ 'line': 2,
|
\ 'line': 2,
|
||||||
\ 'col': 10,
|
\ 'col': 10,
|
||||||
|
\ 'wrap': 0,
|
||||||
|
\ 'fixed': 1,
|
||||||
\ 'zindex': 90,
|
\ 'zindex': 90,
|
||||||
\ 'padding': [],
|
\ 'padding': [],
|
||||||
\ 'highlight': 'PopupColor',
|
\ 'highlight': 'PopupColor',
|
||||||
@@ -454,6 +456,12 @@ func Test_popup_with_mask()
|
|||||||
call term_sendkeys(buf, ":call popup_move(winid, {'col': 11, 'line': 3})\<CR>")
|
call term_sendkeys(buf, ":call popup_move(winid, {'col': 11, 'line': 3})\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_popupwin_mask_2', {})
|
call VerifyScreenDump(buf, 'Test_popupwin_mask_2', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ":call popup_move(winid, {'col': 65, 'line': 3})\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_popupwin_mask_3', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, ":call popup_move(winid, {'pos': 'topright', 'col': 12, 'line': 3})\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_popupwin_mask_4', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('XtestPopupMask')
|
call delete('XtestPopupMask')
|
||||||
|
@@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1617,
|
||||||
/**/
|
/**/
|
||||||
1616,
|
1616,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user