summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-24 22:12:54 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-24 22:12:54 +0200
commitaa1f04d09286085c4031bc7c4ca9fa672f6f4905 (patch)
tree555a454674fc44aa1a2447453871d021044c524e
parent3691f1ee72b68a47e6dcc75927bfa46565cf3614 (diff)
downloadvim-git-aa1f04d09286085c4031bc7c4ca9fa672f6f4905.tar.gz
patch 8.1.2213: popup_textprop tests failv8.1.2213
Problem: Popup_textprop tests fail. Solution: Adjust the column and line positioning.
-rw-r--r--src/popupwin.c27
-rw-r--r--src/version.c2
2 files changed, 17 insertions, 12 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index a53ae0f66..212076bae 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1082,7 +1082,6 @@ popup_adjust_position(win_T *wp)
int org_leftoff = wp->w_popup_leftoff;
int minwidth;
int wantline = wp->w_wantline; // adjusted for textprop
- int use_wantline = wantline != 0;
int wantcol = wp->w_wantcol; // adjusted for textprop
int use_wantcol = wantcol != 0;
@@ -1097,15 +1096,6 @@ popup_adjust_position(win_T *wp)
if (wp->w_popup_last_curline != wp->w_cursor.lnum)
popup_highlight_curline(wp);
- // If no line was specified default to vertical centering.
- if (wantline == 0)
- center_vert = TRUE;
- else if (wantline < 0)
- // If "wantline" is negative it actually means zero.
- wantline = 0;
- if (wantcol < 0)
- wantcol = 0;
-
if (wp->w_popup_prop_type > 0 && win_valid(wp->w_popup_prop_win))
{
win_T *prop_win = wp->w_popup_prop_win;
@@ -1159,6 +1149,19 @@ popup_adjust_position(win_T *wp)
else
// left of the text
wantcol = screen_scol + wantcol - 2;
+ use_wantcol = TRUE;
+ }
+ else
+ {
+ // If no line was specified default to vertical centering.
+ if (wantline == 0)
+ center_vert = TRUE;
+ else if (wantline < 0)
+ // If "wantline" is negative it actually means zero.
+ wantline = 0;
+ if (wantcol < 0)
+ // If "wantcol" is negative it actually means zero.
+ wantcol = 0;
}
if (wp->w_popup_pos == POPPOS_CENTER)
@@ -1169,8 +1172,8 @@ popup_adjust_position(win_T *wp)
}
else
{
- if (use_wantline && (wp->w_popup_pos == POPPOS_TOPLEFT
- || wp->w_popup_pos == POPPOS_TOPRIGHT))
+ if (wantline > 0 && (wp->w_popup_pos == POPPOS_TOPLEFT
+ || wp->w_popup_pos == POPPOS_TOPRIGHT))
{
wp->w_winrow = wantline - 1;
if (wp->w_winrow >= Rows)
diff --git a/src/version.c b/src/version.c
index c5e925e42..4cd05a874 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2213,
+/**/
2212,
/**/
2211,