diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-15 14:55:33 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-15 14:55:33 +0100 |
commit | 5e5a98d7de41457fabad4eb5af3d54cc93f05d0a (patch) | |
tree | ef4b1f570cf5db8ac883a41dff2f9b49609fc4e1 /src/testdir/test_ins_complete.vim | |
parent | f9cb05c14753d984f002c0c090688f8510147e6b (diff) |
patch 8.2.0011: screen updating wrong when opeing preview windowv8.2.0011
Problem: Screen updating wrong when opeing preview window.
Solution: Redraw the window when the preview window opens.
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index ad6294480c..95954f536b 100644 --- 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 |