From de69c657ebbb2fa1ed918b97f27733b801ee639c Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Wed, 2 Feb 2022 19:25:25 +0900 Subject: [PATCH] Fix menu position for horizontal splitting --- lua/cmp/view/wildmenu_entries_view.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/cmp/view/wildmenu_entries_view.lua b/lua/cmp/view/wildmenu_entries_view.lua index 02ffd7b..252fb40 100644 --- a/lua/cmp/view/wildmenu_entries_view.lua +++ b/lua/cmp/view/wildmenu_entries_view.lua @@ -140,10 +140,11 @@ statusline_entries_view.open = function(self, offset, entries) end end + local wininfo = vim.fn.getwininfo(vim.api.nvim_get_current_win())[1] or { winrow = 1 } self.entries_win:open({ relative = 'editor', style = 'minimal', - row = vim.api.nvim_win_get_height(0), + row = vim.api.nvim_win_get_height(0) + wininfo.winrow - 1, col = 0, width = vim.api.nvim_win_get_width(0), height = 1,