// make bottom aligned and recompute the height
wp->w_height = w_height_before_limit;
wp->w_winrow = wantline - 2 - wp->w_height - extra_height;
+ if (wp->w_popup_flags & POPF_INFO)
+ wp->w_winrow += extra_height + 2;
if (wp->w_winrow < 0)
{
wp->w_height += wp->w_winrow;
--- /dev/null
+| +0#af5f00255#ffffff0@1|1| | +0#0000000&@70
+| +0#af5f00255&@1|2| | +0#0000000&@70
+| +0#af5f00255&@1|3| | +0#0000000&@70
+| +0#af5f00255&@1|4| | +0#0000000&@70
+| +0#af5f00255&@1|5| | +0#0000000&@70
+| +0#af5f00255&@1|6| | +0#0000000&@70
+| +0#af5f00255&@1|7| | +0#0000000&@70
+| +0#af5f00255&@1|8| | +0#0000000&@14|╔+0#0000001#e0e0e08|═@7|X| +0#0000000#ffffff0@45
+| +0#af5f00255&@1|9| | +0#0000000&@14|║+0#0000001#e0e0e08| |N|i|n|e| @2|║| +0#0000000#ffffff0@45
+| +0#af5f00255&|1|0| +0#0000001#ffd7ff255|c|p|_|m|a|t|c|h|_|a|r@1|a|y| |║+0&#e0e0e08| |T|e|n| @3|║| +0#0000000#ffffff0@45
+| +0#af5f00255&|1@1| +0#0000001#ffd7ff255|c|p|_|s|t|r| @8|║+0&#e0e0e08| |E|l|e|v|e|n| |║| +0#0000000#ffffff0@45
+| +0#af5f00255&|1|2| +0#0000001#e0e0e08|c|p|_|s|c|o|r|e| @6|║| |T|w|e|l|v|e| |║| +0#0000000#ffffff0@45
+| +0#af5f00255&|1|3| |c+0#0000000&|p|_|s|c|o|r|e> @6|╚+0#0000001#e0e0e08|═@7|⇲| +0#0000000#ffffff0@45
+|~+0#4040ff13&| @73
+|-+2#0000000&@1| |O|m|n|i| |c|o|m|p|l|e|t|i|o|n| |(|^|O|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |3| |o|f| |3| +0#0000000&@34
call StopVimInTerminal(buf)
endfunc
+func Test_popupmenu_info_align_item()
+ CheckScreendump
+ let lines =<< trim END
+ func Omni_test(findstart, base)
+ if a:findstart
+ return col(".")
+ endif
+ return [
+ \ #{word: "cp_match_array", info: "One\nTwo\nThree\nFour"},
+ \ #{word: "cp_str", info: "Five\nSix\nSeven\nEight"},
+ \ #{word: "cp_score", info: "Nine\nTen\nEleven\nTwelve"},
+ \ ]
+ endfunc
+ set completepopup=border:on,align:item
+ set cot=menu,menuone,popup,
+ set omnifunc=Omni_test
+ set number
+ END
+ call writefile(lines, 'XtestInfoPopupPos', 'D')
+ let buf = RunVimInTerminal('-S XtestInfoPopupPos', #{rows: 15})
+ call TermWait(buf, 25)
+
+ call term_sendkeys(buf, "A"..repeat("\<CR>", 12))
+ call TermWait(buf, 25)
+ call term_sendkeys(buf, "\<C-X>\<C-O>\<C-N>\<C-N>")
+ call TermWait(buf, 25)
+ call VerifyScreenDump(buf, 'Test_popupwin_infopopup_align_item_01', {})
+
+ call term_sendkeys(buf, "\<Esc>")
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_popupmenu_info_hidden()
CheckScreendump
CheckFeature quickfix