diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-11 20:12:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-11 20:12:15 +0100 |
commit | 87e74d0e03c6c0267546b2e3a49316f3e84d9794 (patch) | |
tree | e3f72d62d9212b055d05659d22a909476c5fca1f /src | |
parent | 29ab524358ba429bcf6811710afc97a978641f0b (diff) |
patch 9.0.0446: message window may be positioned too lowv9.0.0446
Problem: Message window may be positioned too low.
Solution: Compute cmdline_row before computing the position.
Diffstat (limited to 'src')
-rw-r--r-- | src/popupwin.c | 7 | ||||
-rw-r--r-- | src/testdir/dumps/Test_echowindow_5.dump | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index a33fa5f8b7..d02196ef50 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -1301,9 +1301,14 @@ popup_adjust_position(win_T *wp) wp->w_winrow = Rows - 1; } if (wp->w_popup_pos == POPPOS_BOTTOM) - // assume that each buffer line takes one screen line + { + // 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; diff --git a/src/testdir/dumps/Test_echowindow_5.dump b/src/testdir/dumps/Test_echowindow_5.dump new file mode 100644 index 0000000000..a87640c867 --- /dev/null +++ b/src/testdir/dumps/Test_echowindow_5.dump @@ -0,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| diff --git a/src/version.c b/src/version.c index ec0f00b182..8da83dbc80 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 446, +/**/ 445, /**/ 444, |