patch 8.1.2031: cursor position wrong when resizing and using conceal
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)
diff --git a/src/testdir/test_conceal.vim b/src/testdir/test_conceal.vim
index 6b95242..bec2164 100644
--- a/src/testdir/test_conceal.vim
+++ b/src/testdir/test_conceal.vim
@@ -135,3 +135,23 @@
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