To: vim_dev@googlegroups.com Subject: Patch 8.1.2031 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2031 Problem: Cursor position wrong when resizing and using conceal. Solution: Set the flags that the cursor position is valid when setting the row and column during redrawing. (closes #4931) Files: src/screen.c, src/testdir/test_conceal.vim, src/testdir/dumps/Test_conceal_resize_01.dump, src/testdir/dumps/Test_conceal_resize_02.dump *** ../vim-8.1.2030/src/screen.c 2019-09-14 21:00:01.383100879 +0200 --- src/screen.c 2019-09-14 21:54:53.414242382 +0200 *************** *** 5374,5379 **** --- 5374,5380 ---- wp->w_wcol = col - boguscols; wp->w_wrow = row; did_wcol = TRUE; + curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL; } #endif *** ../vim-8.1.2030/src/testdir/test_conceal.vim 2019-08-07 23:07:03.960858821 +0200 --- src/testdir/test_conceal.vim 2019-09-14 21:49:57.779407374 +0200 *************** *** 135,137 **** --- 135,157 ---- call StopVimInTerminal(buf) call delete('XTest_conceal_cul') endfunc + + func Test_conceal_resize_term() + let code =<< trim [CODE] + call setline(1, '`one` `two` `three` `four` `five`, the backticks should be concealed') + setl cocu=n cole=3 + syn region CommentCodeSpan matchgroup=Comment start=/`/ end=/`/ concealends + normal fb + [CODE] + call writefile(code, 'XTest_conceal_resize') + let buf = RunVimInTerminal('-S XTest_conceal_resize', {'rows': 6}) + call VerifyScreenDump(buf, 'Test_conceal_resize_01', {}) + + call win_execute(buf->win_findbuf()[0], 'wincmd +') + call term_wait(buf) + call VerifyScreenDump(buf, 'Test_conceal_resize_02', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XTest_conceal_resize') + endfunc *** ../vim-8.1.2030/src/testdir/dumps/Test_conceal_resize_01.dump 2019-09-14 21:55:11.982168257 +0200 --- src/testdir/dumps/Test_conceal_resize_01.dump 2019-09-14 21:52:09.602891846 +0200 *************** *** 0 **** --- 1,6 ---- + |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e|,| |t|h|e| >b|a|c|k|t|i|c|k|s| |s|h|o|u|l|d| |b|e| |c|o|n|c|e|a|l|e|d| @16 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + | +0#0000000&@56|1|,|4|0| @9|A|l@1| *** ../vim-8.1.2030/src/testdir/dumps/Test_conceal_resize_02.dump 2019-09-14 21:55:11.986168241 +0200 --- src/testdir/dumps/Test_conceal_resize_02.dump 2019-09-14 21:52:10.654887703 +0200 *************** *** 0 **** --- 1,7 ---- + |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e|,| |t|h|e| >b|a|c|k|t|i|c|k|s| |s|h|o|u|l|d| |b|e| |c|o|n|c|e|a|l|e|d| @16 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + | +0#0000000&@56|1|,|4|0| @9|A|l@1| *** ../vim-8.1.2030/src/version.c 2019-09-14 21:23:37.141281837 +0200 --- src/version.c 2019-09-14 21:41:21.509320840 +0200 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 2031, /**/ -- hundred-and-one symptoms of being an internet addict: 257. Your "hundred-and-one" lists include well over 101 items, since you automatically interpret all numbers in hexadecimal notation. (hex 101 = decimal 257) /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///