aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-10-03 17:58:15 +0800
committerGitHub <noreply@github.com>2024-10-03 09:58:15 +0000
commitcc300e553b458e08c4b1d4be117ee51a289cbdee (patch)
tree856f7cdc2bbe25bbc43393f060d61acad9491be0 /test/functional
parentae0e4071a8c90f96a66efc07f421fa7bf15f27f6 (diff)
downloadrneovim-cc300e553b458e08c4b1d4be117ee51a289cbdee.tar.gz
rneovim-cc300e553b458e08c4b1d4be117ee51a289cbdee.tar.bz2
rneovim-cc300e553b458e08c4b1d4be117ee51a289cbdee.zip
vim-patch:9.1.0756: missing change from patch v9.1.0754 (#30636)
Problem: missing change from patch v9.1.0754 Solution: use correct width for the actual item in pum_redraw() (glepnir) closes: vim/vim#15786 https://github.com/vim/vim/commit/a6d9e3c4e07f73f6523699961d8b7b54bdb80cf6
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/popupmenu_spec.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index e2f7e31c6c..f84362ede8 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -5077,6 +5077,17 @@ describe('builtin popupmenu', function()
\ { 'word': '你好', 'kind': 'C', 'menu': '中文' },
\]}
endfunc
+
+ func Omni_long(findstart, base)
+ if a:findstart
+ return col(".")
+ endif
+ return {
+ \ 'words': [
+ \ { 'word': 'loooong_foo', 'kind': 'S', 'menu': 'menu' },
+ \ { 'word': 'loooong_bar', 'kind': 'T', 'menu': 'menu' },
+ \]}
+ endfunc
set omnifunc=Omni_test
]])
-- T1
@@ -5162,6 +5173,20 @@ describe('builtin popupmenu', function()
{1:~ }|*10
{2:-- }{5:match 1 of 3} |
]])
+ feed('<C-E><ESC>')
+
+ -- Test_pum_completeitemalign_07
+ command('set cia=menu,kind,abbr columns=12 cmdheight=2 omnifunc=Omni_long')
+ feed('S<C-X><C-O>')
+ screen:expect([[
+ loooong_foo^ |
+ {s:menu S loooo}|
+ {n:menu T loooo}|
+ {1:~ }|*10
+ |
+ {2:--} |
+ ]])
+ feed('<C-E><ESC>')
end)
end
end