comparison src/testdir/test_popupwin.vim @ 30606:c5356021a938 v9.0.0638

patch 9.0.0638: popup menu highlight wrong on top of preview popup Commit: https://github.com/vim/vim/commit/393f8d61f55cb6127a100e812ba4d66097a32d2e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 2 14:28:30 2022 +0100 patch 9.0.0638: popup menu highlight wrong on top of preview popup Problem: Popup menu highlight wrong on top of preview popup. (Yegappan Lakshmanan) Solution: Also check for the popup menu in screen_line().
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Oct 2022 15:30:07 +0200
parents 457ea0570b6f
children 360f286b5869
comparison
equal deleted inserted replaced
30605:157961d500ff 30606:c5356021a938
3360 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_10', {}) 3360 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_10', {})
3361 3361
3362 call StopVimInTerminal(buf) 3362 call StopVimInTerminal(buf)
3363 endfunc 3363 endfunc
3364 3364
3365 func Test_previewpopup_pum()
3366 CheckScreendump
3367 CheckFeature quickfix
3368
3369 let lines =<< trim END
3370 let a = 3
3371 let b = 1
3372 echo a
3373 echo b
3374 call system('echo hello')
3375 " the end
3376 END
3377 call writefile(lines, 'XpreviewText.vim', 'D')
3378
3379 let lines =<< trim END
3380 call setline(1, ['one', 'two', 'three', 'other', 'once', 'only', 'off'])
3381 set previewpopup=height:6,width:40
3382 pedit XpreviewText.vim
3383 END
3384 call writefile(lines, 'XtestPreviewPum', 'D')
3385 let buf = RunVimInTerminal('-S XtestPreviewPum', #{rows: 12})
3386
3387 call term_sendkeys(buf, "A o\<C-N>")
3388 call VerifyScreenDump(buf, 'Test_pum_preview_1', {})
3389
3390 call term_sendkeys(buf, "\<C-N>")
3391 call VerifyScreenDump(buf, 'Test_pum_preview_2', {})
3392
3393 call term_sendkeys(buf, "\<C-N>")
3394 call VerifyScreenDump(buf, 'Test_pum_preview_3', {})
3395
3396 call term_sendkeys(buf, "\<C-N>")
3397 call VerifyScreenDump(buf, 'Test_pum_preview_4', {})
3398
3399 call term_sendkeys(buf, "\<Esc>")
3400 call StopVimInTerminal(buf)
3401 endfunc
3402
3403
3365 func Get_popupmenu_lines() 3404 func Get_popupmenu_lines()
3366 let lines =<< trim END 3405 let lines =<< trim END
3367 set completeopt+=preview,popup 3406 set completeopt+=preview,popup
3368 set completefunc=CompleteFuncDict 3407 set completefunc=CompleteFuncDict
3369 hi InfoPopup ctermbg=yellow 3408 hi InfoPopup ctermbg=yellow