aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-30 21:45:07 +0800
committerGitHub <noreply@github.com>2025-03-30 21:45:07 +0800
commite4f37481ff37e48ff90c36a52af657ad73998d8c (patch)
tree0507ac4dc24469eeb7ba9a0a809477603d00f68e
parent431c037709d1e0e44a97b9eaa51afdc8354b492c (diff)
downloadrneovim-e4f37481ff37e48ff90c36a52af657ad73998d8c.tar.gz
rneovim-e4f37481ff37e48ff90c36a52af657ad73998d8c.tar.bz2
rneovim-e4f37481ff37e48ff90c36a52af657ad73998d8c.zip
vim-patch:9.1.1261: No test for 'pummaxwidth' non-truncated items (#33193)
Problem: No test for 'pummaxwidth' non-truncated items (after v9.1.1250) Solution: Add shorter items to Test_pum_maxwidth_multibyte() (zeertzjq). closes: vim/vim#17007 https://github.com/vim/vim/commit/c6336acfe3e80904458d7ea735929b4c91346702
-rw-r--r--test/functional/ui/popupmenu_spec.lua42
-rw-r--r--test/old/testdir/test_popup.vim2
2 files changed, 32 insertions, 12 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 6404feb9cd..c73cec22a0 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -5670,6 +5670,8 @@ describe('builtin popupmenu', function()
return [
\ #{word: "123456789_123456789_123456789_"},
\ #{word: "一二三四五六七八九十"},
+ \ #{word: "abcdefghij"},
+ \ #{word: "上下左右"},
\ ]
endfunc
set omnifunc=Omni_test
@@ -5686,10 +5688,12 @@ describe('builtin popupmenu', function()
123456789_123456789_123456789_^ |
{1:~ }|*6
## grid 3
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
## grid 4
{s:123456789_123456789_123456789_ }|
{n:一二三四五六七八九十 }|
+ {n:abcdefghij }|
+ {n:上下左右 }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
})
@@ -5698,8 +5702,10 @@ describe('builtin popupmenu', function()
123456789_123456789_123456789_^ |
{s:123456789_123456789_123456789_ }{1: }|
{n:一二三四五六七八九十 }{1: }|
- {1:~ }|*4
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {n:abcdefghij }{1: }|
+ {n:上下左右 }{1: }|
+ {1:~ }|*2
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
]])
end
feed('<Esc>')
@@ -5716,10 +5722,12 @@ describe('builtin popupmenu', function()
123456789_123456789_123456789_^ |
{1:~ }|*6
## grid 3
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
## grid 4
{s:1234567...}|
{n:一二三 ...}|
+ {n:abcdefghij}|
+ {n:上下左右 }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
})
@@ -5728,8 +5736,10 @@ describe('builtin popupmenu', function()
123456789_123456789_123456789_^ |
{s:1234567...}{1: }|
{n:一二三 ...}{1: }|
- {1:~ }|*4
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {n:abcdefghij}{1: }|
+ {n:上下左右 }{1: }|
+ {1:~ }|*2
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
]])
end
feed('<Esc>')
@@ -5746,10 +5756,12 @@ describe('builtin popupmenu', function()
^ _987654321_987654321_987654321|
{1: ~}|*6
## grid 3
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
## grid 4
{s:...7654321}|
{n:... 三二一}|
+ {n:jihgfedcba}|
+ {n: 右左下上}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 50, false, 100 } },
})
@@ -5758,8 +5770,10 @@ describe('builtin popupmenu', function()
^ _987654321_987654321_987654321|
{1: }{s:...7654321}|
{1: }{n:... 三二一}|
- {1: ~}|*4
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {1: }{n:jihgfedcba}|
+ {1: }{n: 右左下上}|
+ {1: ~}|*2
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
]])
end
feed('<Esc>')
@@ -5777,10 +5791,12 @@ describe('builtin popupmenu', function()
123456789_123456789_123456789_^ |
{1:~ }|*6
## grid 3
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
## grid 4
{s:12}|
{n:一}|
+ {n:ab}|
+ {n:上}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
})
@@ -5789,8 +5805,10 @@ describe('builtin popupmenu', function()
123456789_123456789_123456789_^ |
{s:12}{1: }|
{n:一}{1: }|
- {1:~ }|*4
- {2:-- Omni completion (^O^N^P) }{5:match 1 of 2} |
+ {n:ab}{1: }|
+ {n:上}{1: }|
+ {1:~ }|*2
+ {2:-- Omni completion (^O^N^P) }{5:match 1 of 4} |
]])
end
feed('<Esc>')
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim
index 94e437ee93..c5591fac05 100644
--- a/test/old/testdir/test_popup.vim
+++ b/test/old/testdir/test_popup.vim
@@ -2042,6 +2042,8 @@ func Test_pum_maxwidth_multibyte()
return [
\ #{word: "123456789_123456789_123456789_"},
\ #{word: "一二三四五六七八九十"},
+ \ #{word: "abcdefghij"},
+ \ #{word: "上下左右"},
\ ]
endfunc
set omnifunc=Omni_test