patch 9.1.0756: missing change from patch v9.1.0754
Problem: missing change from patch v9.1.0754
Solution: use correct width for the actual item
in pum_redraw() (glepnir)
closes: #15786
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 1758f74..a4f6d02 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1595,6 +1595,17 @@
\ { '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
command! -nargs=0 T1 set cia=abbr,kind,menu
command! -nargs=0 T2 set cia=abbr,menu,kind
@@ -1636,8 +1647,11 @@
" T6
call term_sendkeys(buf, ":T6\<CR>S\<C-X>\<C-O>")
call VerifyScreenDump(buf, 'Test_pum_completeitemalign_06', {})
- call term_sendkeys(buf, "\<C-E>\<Esc>:T7\<CR>")
+ call term_sendkeys(buf, "\<C-E>\<Esc>")
+ call term_sendkeys(buf, ":set columns=12 cmdheight=2 omnifunc=Omni_long\<CR>S\<C-X>\<C-O>")
+ call VerifyScreenDump(buf, 'Test_pum_completeitemalign_07', {})
+ call term_sendkeys(buf, "\<C-E>\<Esc>:T7\<CR>")
call StopVimInTerminal(buf)
endfunc