]> granicus.if.org Git - vim/commitdiff
patch 8.1.1917: non-current window is not redrawn when moving popup v8.1.1917
authorBram Moolenaar <Bram@vim.org>
Sat, 24 Aug 2019 12:46:29 +0000 (14:46 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 24 Aug 2019 12:46:29 +0000 (14:46 +0200)
Problem:    Non-current window is not redrawn when moving popup. (Ben Jackson)
Solution:   Redraw all windows under a popup. (closes #4860)

src/popupwin.c
src/testdir/dumps/Test_popupwin_drag_01.dump
src/testdir/dumps/Test_popupwin_drag_02.dump
src/testdir/dumps/Test_popupwin_drag_03.dump
src/testdir/test_popupwin.vim
src/version.c

index 0b360df8946257e36a4ed36f54e9fe14c976caa0..e35aa62542c7908995d415d6571500736c187bd2 100644 (file)
@@ -1219,7 +1219,7 @@ popup_adjust_position(win_T *wp)
     wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
 
     // Need to update popup_mask if the position or size changed.
-    // And redraw windows that were behind the popup.
+    // And redraw windows and statuslines that were behind the popup.
     if (org_winrow != wp->w_winrow
            || org_wincol != wp->w_wincol
            || org_leftcol != wp->w_leftcol
@@ -1227,8 +1227,9 @@ popup_adjust_position(win_T *wp)
            || org_width != wp->w_width
            || org_height != wp->w_height)
     {
-       redraw_all_later(VALID);
        redraw_win_later(wp, NOT_VALID);
+       redraw_all_later(SOME_VALID);
+       status_redraw_all();
        if (wp->w_popup_flags & POPF_ON_CMDLINE)
            clear_cmdline = TRUE;
        popup_mask_refresh = TRUE;
index 64afe8275e05bb2aa37f19ceaa958adb0398a98e..afed63e18f9d9fea133de28987556d0b1e9e29f9 100644 (file)
@@ -1,10 +1,10 @@
->1+0&#ffffff0| @73
-|2| @73
-|3| @73
-|4| @73
-|5| @73
-|6| @31|╔+0#0000001#ffd7ff255|═@5|╗| +0#0000000#ffffff0@33
-|7| @31|║+0#0000001#ffd7ff255|1@3| @1|║| +0#0000000#ffffff0@33
-|8| @31|║+0#0000001#ffd7ff255|2@5|║| +0#0000000#ffffff0@33
-|9| @31|║+0#0000001#ffd7ff255|3@4| |║| +0#0000000#ffffff0@33
-@33|╚+0#0000001#ffd7ff255|═@5|⇲| +0#0000000#ffffff0@15|1|,|1| @10|T|o|p| 
+>1+0&#ffffff0| @35||+1&&|1+0&&| @35
+|2| @35||+1&&|2+0&&| @35
+|3| @35||+1&&|3+0&&| @35
+|4| @35||+1&&|4+0&&| @35
+|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p
+|1+0&&| @31|╔+0#0000001#ffd7ff255|═@5|╗| +0#0000000#ffffff0@33
+|2| @31|║+0#0000001#ffd7ff255|1@3| @1|║| +0#0000000#ffffff0@33
+|3| @31|║+0#0000001#ffd7ff255|2@5|║| +0#0000000#ffffff0@33
+|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @10|║+0#0000001#ffd7ff255|3@4| |║| +1#0000000#ffffff0|N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p
+| +0&&@32|╚+0#0000001#ffd7ff255|═@5|⇲| +0#0000000#ffffff0@33
index 2597e1d069e784313226fd1b49cec976a2601998..a6a560d938aa67ee39ccf49739a6663c998326ed 100644 (file)
@@ -1,10 +1,10 @@
->1+0&#ffffff0| @73
-|2| @31|╔+0#0000001#ffd7ff255|═@5|╗| +0#0000000#ffffff0@33
-|3| @31|║+0#0000001#ffd7ff255|1@3| @1|║| +0#0000000#ffffff0@33
-|4| @31|║+0#0000001#ffd7ff255|2@5|║| +0#0000000#ffffff0@33
-|5| @31|║+0#0000001#ffd7ff255|3@4| |║| +0#0000000#ffffff0@33
-|6| @31|╚+0#0000001#ffd7ff255|═@5|⇲| +0#0000000#ffffff0@33
-|7| @73
-|8| @73
-|9| @73
-@57|1|,|1| @10|T|o|p| 
+>1+0&#ffffff0| @35||+1&&|1+0&&| @35
+|2| @11|╔+0#0000001#ffd7ff255|═@5|╗| +0#0000000#ffffff0@15||+1&&|2+0&&| @35
+|3| @11|║+0#0000001#ffd7ff255|1@3| @1|║| +0#0000000#ffffff0@15||+1&&|3+0&&| @35
+|4| @11|║+0#0000001#ffd7ff255|2@5|║| +0#0000000#ffffff0@15||+1&&|4+0&&| @35
+|[+3&&|N|o| |N|a|m|e|]| |[|+|]|║+0#0000001#ffd7ff255|3@4| |║|1+3#0000000#ffffff0| @11|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p
+|1+0&&| @11|╚+0#0000001#ffd7ff255|═@5|⇲| +0#0000000#ffffff0@15||+1&&|1+0&&| @35
+|2| @35||+1&&|2+0&&| @35
+|3| @35||+1&&|3+0&&| @35
+|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p| |[|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p
+| +0&&@74
index b6b363a5fa0209b3d96a8bf78966fba1ce730a1b..497a6e37d2ffacabc24f67f0c9feadf725688277 100644 (file)
@@ -1,10 +1,10 @@
->1+0&#ffffff0| @73
-|2| @31|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@29
-|3| @31|║+0#0000001#ffd7ff255|1@3| @5|║| +0#0000000#ffffff0@29
-|4| @31|║+0#0000001#ffd7ff255|2@5| @3|║| +0#0000000#ffffff0@29
-|5| @31|║+0#0000001#ffd7ff255|3@4| @4|║| +0#0000000#ffffff0@29
-|6| @31|║+0#0000001#ffd7ff255| +0#4040ff13&@9|║+0#0000001&| +0#0000000#ffffff0@29
-|7| @31|╚+0#0000001#ffd7ff255|═@9|⇲| +0#0000000#ffffff0@29
-|8| @73
-|9| @73
-|:|c|a|l@1| |R|e|s|i|z|e|(|)| @42|1|,|1| @10|T|o|p| 
+>1+0&#ffffff0| @35||+1&&|1+0&&| @35
+|2| @11|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@11||+1&&|2+0&&| @35
+|3| @11|║+0#0000001#ffd7ff255|1@3| @5|║| +0#0000000#ffffff0@11||+1&&|3+0&&| @35
+|4| @11|║+0#0000001#ffd7ff255|2@5| @3|║| +0#0000000#ffffff0@11||+1&&|4+0&&| @35
+|[+3&&|N|o| |N|a|m|e|]| |[|+|]|║+0#0000001#ffd7ff255|3@4| @4|║| +3#0000000#ffffff0@8|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p
+|1+0&&| @11|║+0#0000001#ffd7ff255| +0#4040ff13&@9|║+0#0000001&| +0#0000000#ffffff0@11||+1&&|1+0&&| @35
+|2| @11|╚+0#0000001#ffd7ff255|═@9|⇲| +0#0000000#ffffff0@11||+1&&|2+0&&| @35
+|3| @35||+1&&|3+0&&| @35
+|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p| |[|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p
+|:+0&&|c|a|l@1| |R|e|s|i|z|e|(|)| @60
index 23041d1db9c526128051c80284eea20d32fbad73..810a2047c186321614aef3c7050fe539dc5fbea1 100644 (file)
@@ -343,6 +343,11 @@ func Test_popup_drag()
   " create a popup that covers the command line
   let lines =<< trim END
        call setline(1, range(1, 20))
+       split
+       vsplit
+       $wincmd w
+       vsplit
+       1wincmd w
        let winid = popup_create(['1111', '222222', '33333'], #{
              \ drag: 1,
              \ resize: 1,
@@ -353,12 +358,12 @@ func Test_popup_drag()
          call feedkeys("\<F3>\<LeftMouse>\<F4>\<LeftDrag>\<LeftRelease>", "xt")
        endfunc
        map <silent> <F3> :call test_setmouse(&lines - 4, &columns / 2)<CR>
-       map <silent> <F4> :call test_setmouse(&lines - 8, &columns / 2)<CR>
+       map <silent> <F4> :call test_setmouse(&lines - 8, &columns / 2 - 20)<CR>
        func Resize()
          call feedkeys("\<F5>\<LeftMouse>\<F6>\<LeftDrag>\<LeftRelease>", "xt")
        endfunc
-       map <silent> <F5> :call test_setmouse(6, 41)<CR>
-       map <silent> <F6> :call test_setmouse(7, 45)<CR>
+       map <silent> <F5> :call test_setmouse(6, 21)<CR>
+       map <silent> <F6> :call test_setmouse(7, 25)<CR>
   END
   call writefile(lines, 'XtestPopupDrag')
   let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10})
index 51851e33b8612ac7e33932f2f2759c007ec76409..ae4b4e99a547c50f0a5dbcd3504855d79e2a56d9 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1917,
 /**/
     1916,
 /**/