To: vim_dev@googlegroups.com Subject: Patch 8.1.2213 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2213 Problem: Popup_textprop tests fail. Solution: Adjust the column and line positioning. Files: src/popupwin.c *** ../vim-8.1.2212/src/popupwin.c 2019-10-24 19:24:56.531366030 +0200 --- src/popupwin.c 2019-10-24 22:07:32.078616280 +0200 *************** *** 1082,1088 **** 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; --- 1082,1087 ---- *************** *** 1097,1111 **** 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; --- 1096,1101 ---- *************** *** 1159,1164 **** --- 1149,1167 ---- 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,1176 **** } else { ! if (use_wantline && (wp->w_popup_pos == POPPOS_TOPLEFT ! || wp->w_popup_pos == POPPOS_TOPRIGHT)) { wp->w_winrow = wantline - 1; if (wp->w_winrow >= Rows) --- 1172,1179 ---- } else { ! 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) *** ../vim-8.1.2212/src/version.c 2019-10-24 20:16:56.117110116 +0200 --- src/version.c 2019-10-24 20:58:33.334403035 +0200 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 2213, /**/ -- The acknowledged parents of reengineering are Michael Hammer and James Champy. When I say they're the "parents" I don't mean they had sex - and I apologize for making you think about it. I mean they wrote the best-selling business book _Reengineering the Corporation_, which was published in 1993. Businesses flocked to reengineering like frat boys to a drunken cheerleader. (This analogy wasn't necessary, but I'm trying to get my mind off that Hammer and Champy thing.) (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///