Add scrolloff option for completion window.

This commit is contained in:
hrsh7th
2022-10-02 19:47:01 +09:00
parent 2427d06b65
commit beb1d14c5e
5 changed files with 10 additions and 1 deletions

View File

@@ -30,7 +30,6 @@ custom_entries_view.new = function()
self.entries_win:option('cursorlineopt', 'line')
self.entries_win:option('foldenable', false)
self.entries_win:option('wrap', false)
self.entries_win:option('scrolloff', 0)
-- This is done so that strdisplaywidth calculations for lines in the
-- custom_entries_view window exactly match with what is really displayed,
-- see comment in cmp.Entry.get_view. Setting tabstop to 1 makes all tabs be
@@ -195,6 +194,7 @@ custom_entries_view.open = function(self, offset, entries)
-- Apply window options (that might be changed) on the custom completion menu.
self.entries_win:option('winblend', vim.o.pumblend)
self.entries_win:option('winhighlight', completion.winhighlight)
self.entries_win:option('scrolloff', completion.scrolloff)
self.entries_win:open({
relative = 'editor',
style = 'minimal',