comparison src/testdir/test_normal.vim @ 32748:a5a2a5e56c63 v9.0.1693

patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode Commit: https://github.com/vim/vim/commit/2d63e4b3ccc0bb34db21a3c1d024cb114f8c4071 Author: Christian Brabandt <cb@256bit.org> Date: Sat Aug 12 00:03:57 2023 +0200 patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode Problem: Ctrl-Q not handled like Ctrl-V in replace mode Solution: Handle Ctrl-Q like Ctrl-V closes: #12686 closes: #12684 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Aug 2023 00:15:03 +0200
parents 695b50472e85
children 1be7af7425f6
comparison
equal deleted inserted replaced
32747:581a2bf3f4d6 32748:a5a2a5e56c63
3996 call VerifyScreenDump(buf, 'Test_normal_j_below_botline', {}) 3996 call VerifyScreenDump(buf, 'Test_normal_j_below_botline', {})
3997 3997
3998 call StopVimInTerminal(buf) 3998 call StopVimInTerminal(buf)
3999 endfunc 3999 endfunc
4000 4000
4001 " Test for r (replace) command with CTRL_V and CTRL_Q
4002 func Test_normal_r_ctrl_v_cmd()
4003 new
4004 call append(0, 'This is a simple test: abcd')
4005 exe "norm! 1gg$r\<C-V>\<C-V>"
4006 call assert_equal(['This is a simple test: abc', ''], getline(1,'$'))
4007 exe "norm! 1gg$hr\<C-Q>\<C-Q>"
4008 call assert_equal(['This is a simple test: ab', ''], getline(1,'$'))
4009 exe "norm! 1gg$2hr\<C-V>x7e"
4010 call assert_equal(['This is a simple test: a~', ''], getline(1,'$'))
4011 exe "norm! 1gg$3hr\<C-Q>x7e"
4012 call assert_equal(['This is a simple test: ~~', ''], getline(1,'$'))
4013
4014 if &encoding == 'utf-8'
4015 exe "norm! 1gg$4hr\<C-V>u20ac"
4016 call assert_equal(['This is a simple test:€~~', ''], getline(1,'$'))
4017 exe "norm! 1gg$5hr\<C-Q>u20ac"
4018 call assert_equal(['This is a simple test€€~~', ''], getline(1,'$'))
4019 exe "norm! 1gg0R\<C-V>xff WAS \<esc>"
4020 call assert_equal(['ÿ WAS a simple test€€~~', ''], getline(1,'$'))
4021 exe "norm! 1gg0elR\<C-Q>xffNOT\<esc>"
4022 call assert_equal(['ÿ WASÿNOT simple test€€~~', ''], getline(1,'$'))
4023 endif
4024
4025 call setline(1, 'This is a simple test: abcd')
4026 exe "norm! 1gg$gr\<C-V>\<C-V>"
4027 call assert_equal(['This is a simple test: abc', ''], getline(1,'$'))
4028 exe "norm! 1gg$hgr\<C-Q>\<C-Q>"
4029 call assert_equal(['This is a simple test: ab ', ''], getline(1,'$'))
4030 exe "norm! 1gg$2hgr\<C-V>x7e"
4031 call assert_equal(['This is a simple test: a~ ', ''], getline(1,'$'))
4032 exe "norm! 1gg$3hgr\<C-Q>x7e"
4033 call assert_equal(['This is a simple test: ~~ ', ''], getline(1,'$'))
4034
4035 " clean up
4036 bw!
4037 endfunc
4038
4001 " vim: shiftwidth=2 sts=2 expandtab 4039 " vim: shiftwidth=2 sts=2 expandtab