]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1456: WinBar not redrawn after scrolling one line 4474/head v8.1.1456
authorBram Moolenaar <Bram@vim.org>
Sun, 2 Jun 2019 18:33:32 +0000 (20:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 2 Jun 2019 18:33:32 +0000 (20:33 +0200)
Problem:    WinBar not redrawn after scrolling one line.
Solution:   Exclude the winbar height when deciding what to redraw.
            (closes #4473)

src/screen.c
src/testdir/test_winbar.vim
src/version.c

index 8c97e880e62d540847787ef3efbd91bf9bafe425..37999bbf6bd9edc523c835ba3d731c28b6021bbb 100644 (file)
@@ -645,7 +645,7 @@ update_screen(int type_arg)
                type = CLEAR;
            FOR_ALL_WINDOWS(wp)
            {
-               if (W_WINROW(wp) < msg_scrolled)
+               if (wp->w_winrow < msg_scrolled)
                {
                    if (W_WINROW(wp) + wp->w_height > msg_scrolled
                            && wp->w_redr_type < REDRAW_TOP
index a34c29e4128bab9d86a404ff749aeb4c0cda3286..c0b43b934e3ce4d91247b0725adeda55a57a316a 100644 (file)
@@ -110,3 +110,15 @@ func Test_click_in_other_winbar()
 
   bwipe!
 endfunc
+
+func Test_redraw_after_scroll()
+  new
+  amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
+  redraw
+  call assert_equal("  Next", Screenline(1))
+  echo "some\nmore"
+  redraw
+  call assert_equal("  Next", Screenline(1))
+  bwipe!
+endfunc
+
index 13961d4dabeda233a584fb7fb26e9c1504af28d5..29006c12c2fdc55dcfe7728770f2fd9e7a1918dc 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1456,
 /**/
     1455,
 /**/