mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1448: statusline is sometimes drawn on top of popup
Problem: Statusline is sometimes drawn on top of popup. Solution: Redraw popups after the statusline. (Naruhiko Nishino, closes #4468)
This commit is contained in:
parent
7b29dd8507
commit
988c43310a
22
src/screen.c
22
src/screen.c
@ -823,7 +823,7 @@ update_screen(int type_arg)
|
|||||||
did_intro = TRUE;
|
did_intro = TRUE;
|
||||||
|
|
||||||
#ifdef FEAT_TEXT_PROP
|
#ifdef FEAT_TEXT_PROP
|
||||||
// Display popup windows on top of the others.
|
// Display popup windows on top of the windows.
|
||||||
update_popups();
|
update_popups();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -987,6 +987,11 @@ update_debug_sign(buf_T *buf, linenr_T lnum)
|
|||||||
win_redr_status(wp, FALSE);
|
win_redr_status(wp, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FEAT_TEXT_PROP
|
||||||
|
// Display popup windows on top of the others.
|
||||||
|
update_popups();
|
||||||
|
#endif
|
||||||
|
|
||||||
update_finish();
|
update_finish();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1211,6 +1216,11 @@ updateWindow(win_T *wp)
|
|||||||
)
|
)
|
||||||
win_redr_status(wp, FALSE);
|
win_redr_status(wp, FALSE);
|
||||||
|
|
||||||
|
#ifdef FEAT_TEXT_PROP
|
||||||
|
// Display popup windows on top of everything.
|
||||||
|
update_popups();
|
||||||
|
#endif
|
||||||
|
|
||||||
update_finish();
|
update_finish();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -6795,6 +6805,11 @@ redraw_statuslines(void)
|
|||||||
win_redr_status(wp, FALSE);
|
win_redr_status(wp, FALSE);
|
||||||
if (redraw_tabline)
|
if (redraw_tabline)
|
||||||
draw_tabline();
|
draw_tabline();
|
||||||
|
|
||||||
|
#ifdef FEAT_TEXT_PROP
|
||||||
|
// Display popup windows on top of the status lines.
|
||||||
|
update_popups();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_WILDMENU) || defined(PROTO)
|
#if defined(FEAT_WILDMENU) || defined(PROTO)
|
||||||
@ -11101,6 +11116,11 @@ showruler(int always)
|
|||||||
/* Redraw the tab pages line if needed. */
|
/* Redraw the tab pages line if needed. */
|
||||||
if (redraw_tabline)
|
if (redraw_tabline)
|
||||||
draw_tabline();
|
draw_tabline();
|
||||||
|
|
||||||
|
#ifdef FEAT_TEXT_PROP
|
||||||
|
// Display popup windows on top of everything.
|
||||||
|
update_popups();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_CMDL_INFO
|
#ifdef FEAT_CMDL_INFO
|
||||||
|
10
src/testdir/dumps/Test_popupwin_behind.dump
Normal file
10
src/testdir/dumps/Test_popupwin_behind.dump
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
| +0&#ffffff0@36||+1&&> +0&&@36
|
||||||
|
|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||||
|
|~| @35||+1#0000000&|~+0#4040ff13&| @35
|
||||||
|
|~| @34|l+0#0000001#ffd7ff255|i|n|e|1| +0#4040ff13#ffffff0@33
|
||||||
|
|[+1#0000000&|N|o| |N|a|m|e|]| @9|0|,|0|-|1| @9|A|l|l+0#0000001#ffd7ff255|i|n|e|2| +3#0000000#ffffff0|N|a|m|e|]| @9|0|,|0|-|1| @9|A|l@1
|
||||||
|
| +0&&@35|l+0#0000001#ffd7ff255|i|n|e|3| +0#0000000#ffffff0@33
|
||||||
|
|~+0#4040ff13&| @34|l+0#0000001#ffd7ff255|i|n|e|4| +0#4040ff13#ffffff0@33
|
||||||
|
|~| @73
|
||||||
|
|[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
|
||||||
|
|A+0&&|l|r|e|a|d|y| |o|n|l|y| |o|n|e| |w|i|n|d|o|w| @51
|
@ -610,3 +610,40 @@ func Test_popup_empty()
|
|||||||
call assert_equal(2, pos.width)
|
call assert_equal(2, pos.width)
|
||||||
call assert_equal(3, pos.height)
|
call assert_equal(3, pos.height)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_popup_never_behind()
|
||||||
|
if !CanRunVimInTerminal()
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
" +-----------------------------+
|
||||||
|
" | | |
|
||||||
|
" | | |
|
||||||
|
" | | |
|
||||||
|
" | line1 |
|
||||||
|
" |------------line2------------|
|
||||||
|
" | line3 |
|
||||||
|
" | line4 |
|
||||||
|
" | |
|
||||||
|
" | |
|
||||||
|
" +-----------------------------+
|
||||||
|
let lines =<< trim END
|
||||||
|
only
|
||||||
|
split
|
||||||
|
vsplit
|
||||||
|
let info_window1 = getwininfo()[0]
|
||||||
|
let line = info_window1['height']
|
||||||
|
let col = info_window1['width']
|
||||||
|
call popup_create(['line1', 'line2', 'line3', 'line4'], {
|
||||||
|
\ 'line' : line,
|
||||||
|
\ 'col' : col,
|
||||||
|
\ })
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XtestPopupBehind')
|
||||||
|
let buf = RunVimInTerminal('-S XtestPopupBehind', {'rows': 10})
|
||||||
|
call term_sendkeys(buf, "\<C-W>w")
|
||||||
|
call VerifyScreenDump(buf, 'Test_popupwin_behind', {})
|
||||||
|
|
||||||
|
" clean up
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
call delete('XtestPopupBehind')
|
||||||
|
endfunc
|
||||||
|
@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1448,
|
||||||
/**/
|
/**/
|
||||||
1447,
|
1447,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user