Patch 9.0.0446

3 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 11, 2022, 3:14:29 PM9/11/22
to vim...@googlegroups.com

Patch 9.0.0446
Problem: Message window may be positioned too low.
Solution: Compute cmdline_row before computing the position.
Files: src/popupwin.c, src/testdir/dumps/Test_echowindow_5.dump


*** ../vim-9.0.0445/src/popupwin.c 2022-09-09 20:19:19.548094855 +0100
--- src/popupwin.c 2022-09-11 20:11:16.564938920 +0100
***************
*** 1301,1309 ****
wp->w_winrow = Rows - 1;
}
if (wp->w_popup_pos == POPPOS_BOTTOM)
! // assume that each buffer line takes one screen line
wp->w_winrow = MAX(cmdline_row
- wp->w_buffer->b_ml.ml_line_count - 1, 0);

if (!use_wantcol)
center_hor = TRUE;
--- 1301,1314 ----
wp->w_winrow = Rows - 1;
}
if (wp->w_popup_pos == POPPOS_BOTTOM)
! {
! // Assume that each buffer line takes one screen line, and one line
! // for the top border. First make sure cmdline_row is valid,
! // calling update_screen() will set it only later.
! compute_cmdrow();
wp->w_winrow = MAX(cmdline_row
- wp->w_buffer->b_ml.ml_line_count - 1, 0);
+ }

if (!use_wantcol)
center_hor = TRUE;
*** ../vim-9.0.0445/src/testdir/dumps/Test_echowindow_5.dump 2022-09-11 20:11:43.872877107 +0100
--- src/testdir/dumps/Test_echowindow_5.dump 2022-09-11 20:05:48.125689439 +0100
***************
*** 0 ****
--- 1,8 ----
+ >s+0&#ffffff0|o|m|e| |t|e|x|t| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |═+0#e000002&@74
+ |m|e|s@1|a|g|e| @67
+ |o+0#0000000&|n|e| @71
+ |t|w|o| @53|1|,|1| @10|A|l@1|
*** ../vim-9.0.0445/src/version.c 2022-09-11 16:59:48.938110035 +0100
--- src/version.c 2022-09-11 20:07:20.037477933 +0100
***************
*** 705,706 ****
--- 705,708 ----
{ /* Add new patch number below this line */
+ /**/
+ 446,
/**/

--
"Oh, no! NOT the Spanish Inquisition!"
"NOBODY expects the Spanish Inquisition!!!"
-- Monty Python sketch --
"Oh, no! NOT another option!"
"EVERYBODY expects another option!!!"
-- Discussion in vim-dev mailing list --

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages