Patch 8.2.0011
Problem: Screen updating wrong when opeing preview window.
Solution: Redraw the window when the preview window opens.
Files: src/popupmenu.c, src/testdir/test_ins_complete.vim,
src/testdir/dumps/Test_pum_with_preview_win.dump
*** ../vim-8.2.0010/src/popupmenu.c 2019-12-14 18:41:52.155639334 +0100
--- src/popupmenu.c 2019-12-15 14:53:10.077414333 +0100
***************
*** 913,919 ****
// When the preview window was resized we need to
// update the view on the buffer. Only go back to
// the window when needed, otherwise it will always be
! // redraw.
if (resized && win_valid(curwin_save))
{
++no_u_sync;
--- 913,919 ----
// When the preview window was resized we need to
// update the view on the buffer. Only go back to
// the window when needed, otherwise it will always be
! // redrawn.
if (resized && win_valid(curwin_save))
{
++no_u_sync;
***************
*** 926,933 ****
// Enable updating the status lines.
pum_pretend_not_visible = TRUE;
// But don't draw text at the new popup menu position,
! // it causes flicker.
! pum_will_redraw = TRUE;
update_screen(0);
pum_pretend_not_visible = FALSE;
pum_will_redraw = FALSE;
--- 926,934 ----
// Enable updating the status lines.
pum_pretend_not_visible = TRUE;
// But don't draw text at the new popup menu position,
! // it causes flicker. When resizing we need to draw
! // anyway, the position may change later.
! pum_will_redraw = !resized;
update_screen(0);
pum_pretend_not_visible = FALSE;
pum_will_redraw = FALSE;
***************
*** 949,955 ****
// May need to update the screen again when there are
// autocommands involved.
pum_pretend_not_visible = TRUE;
! pum_will_redraw = TRUE;
update_screen(0);
pum_pretend_not_visible = FALSE;
pum_will_redraw = FALSE;
--- 950,956 ----
// May need to update the screen again when there are
// autocommands involved.
pum_pretend_not_visible = TRUE;
! pum_will_redraw = !resized;
update_screen(0);
pum_pretend_not_visible = FALSE;
pum_will_redraw = FALSE;
*** ../vim-8.2.0010/src/testdir/test_ins_complete.vim 2019-12-14
18:41:52.155639334 +0100
--- src/testdir/test_ins_complete.vim 2019-12-15 14:52:33.061565825 +0100
***************
*** 404,406 ****
--- 404,433 ----
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
*** ../vim-8.2.0010/src/testdir/dumps/Test_pum_with_preview_win.dump
2019-12-15 14:54:02.953198703 +0100
--- src/testdir/dumps/Test_pum_with_preview_win.dump 2019-12-15
14:53:18.441380164 +0100
***************
*** 0 ****
--- 1,12 ----
+ |1+0&#ffffff0|i|n|f|o| @69
+ |~+0#4040ff13&| @73
+ |~| @73
+ |[+1#0000000&|S|c|r|a|t|c|h|]| |[|P|r|e|v|i|e|w|]| @37|1|,|1| @11|A|l@1
+ |o+0&&|n|e> @71
+ |o+0#0000001#e0e0e08|n|e| @11| +0#4040ff13#ffffff0@59
+ |t+0#0000001#ffd7ff255|w|o| @11| +0#4040ff13#ffffff0@59
+ |t+0#0000001#ffd7ff255|h|r|e@1| @9| +0#4040ff13#ffffff0@59
+ |~| @73
+ |~| @73
+ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|1| @11|A|l@1
+ |-+2&&@1| |O|m|n|i| |c|o|m|p|l|e|t|i|o|n| |(|^|O|^|N|^|P|)|
|m+0#00e0003&|a|t|c|h| |1| |o|f| |3| +0#0000000&@34
*** ../vim-8.2.0010/src/version.c 2019-12-15 13:39:09.941980957 +0100
--- src/version.c 2019-12-15 14:09:05.624104391 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 11,
/**/
--
Bravely bold Sir Robin, rode forth from Camelot,
He was not afraid to die, Oh Brave Sir Robin,
He was not at all afraid to be killed in nasty ways
Brave, brave, brave, brave Sir Robin.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201912151356.xBFDu5uL005503%40masaka.moolenaar.net.