comparison src/testdir/test_cmdline.vim @ 28530:80085afc2f4d v8.2.4789

patch 8.2.4789: cursor pos wrong when using :redraw while editing the cmdline Commit: https://github.com/vim/vim/commit/a653e53b1f4ba08de0dbcea06288cf0cc1c6e752 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 19 11:38:24 2022 +0100 patch 8.2.4789: cursor pos wrong when using :redraw while editing the cmdline Problem: The cursor may be in the in wrong place when using :redraw while editing the cmdline. Solution: When editing the command line let :redraw update the command line too. (closes #10210)
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 Apr 2022 12:45:03 +0200
parents 96d53065f309
children b44f15083faf
comparison
equal deleted inserted replaced
28529:5f29eb9fcbc8 28530:80085afc2f4d
189 call term_sendkeys(buf, "\<Esc>") 189 call term_sendkeys(buf, "\<Esc>")
190 190
191 " clean up 191 " clean up
192 call StopVimInTerminal(buf) 192 call StopVimInTerminal(buf)
193 call delete('XTest_wildmenu') 193 call delete('XTest_wildmenu')
194 endfunc
195
196 func Test_redraw_in_autocmd()
197 CheckScreendump
198
199 let lines =<< trim END
200 set cmdheight=2
201 autocmd CmdlineChanged * redraw
202 END
203 call writefile(lines, 'XTest_redraw')
204
205 let buf = RunVimInTerminal('-S XTest_redraw', {'rows': 8})
206 call term_sendkeys(buf, ":for i in range(3)\<CR>")
207 call VerifyScreenDump(buf, 'Test_redraw_in_autocmd_1', {})
208
209 call term_sendkeys(buf, "let i =")
210 call VerifyScreenDump(buf, 'Test_redraw_in_autocmd_2', {})
211
212 " clean up
213 call term_sendkeys(buf, "\<CR>")
214 call StopVimInTerminal(buf)
215 call delete('XTest_redraw')
194 endfunc 216 endfunc
195 217
196 func Test_map_completion() 218 func Test_map_completion()
197 call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt') 219 call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt')
198 call assert_equal('"map <unique> <silent>', getreg(':')) 220 call assert_equal('"map <unique> <silent>', getreg(':'))