Mercurial > vim
diff src/testdir/test_ins_complete.vim @ 18900:a9c47c623f4a v8.2.0011
patch 8.2.0011: screen updating wrong when opeing preview window
Commit: https://github.com/vim/vim/commit/5e5a98d7de41457fabad4eb5af3d54cc93f05d0a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 15 14:55:33 2019 +0100
patch 8.2.0011: screen updating wrong when opeing preview window
Problem: Screen updating wrong when opeing preview window.
Solution: Redraw the window when the preview window opens.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 15 Dec 2019 15:00:04 +0100 |
parents | fb2d26bc8ca1 |
children | a3fce2763e83 |
line wrap: on
line diff
--- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -404,3 +404,30 @@ func Test_pum_with_folds_two_tabs() call StopVimInTerminal(buf) call delete('Xpumscript') endfunc + +func Test_pum_with_preview_win() + CheckScreendump + + let lines =<< trim END + funct Omni_test(findstart, base) + if a:findstart + return col(".") - 1 + endif + return [#{word: "one", info: "1info"}, #{word: "two", info: "2info"}, #{word: "three", info: "3info"}] + endfunc + set omnifunc=Omni_test + set completeopt+=longest + END + + call writefile(lines, 'Xpreviewscript') + let buf = RunVimInTerminal('-S Xpreviewscript', #{rows: 12}) + call term_wait(buf, 100) + call term_sendkeys(buf, "Gi\<C-X>\<C-O>") + call term_wait(buf, 100) + call term_sendkeys(buf, "\<C-N>") + call VerifyScreenDump(buf, 'Test_pum_with_preview_win', {}) + + call term_sendkeys(buf, "\<Esc>") + call StopVimInTerminal(buf) + call delete('Xpreviewscript') +endfunc