aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-15 06:04:50 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-15 18:15:18 +0800
commite263afc0e972d11d3b9b663c3ac0b5575c4deb88 (patch)
treec3ed700a411bba1c69bfbd624bd68871b02c4e80 /test/functional/api/vim_spec.lua
parent3470a9c3de076ec3170525c3de66544f9836c775 (diff)
downloadrneovim-e263afc0e972d11d3b9b663c3ac0b5575c4deb88.tar.gz
rneovim-e263afc0e972d11d3b9b663c3ac0b5575c4deb88.tar.bz2
rneovim-e263afc0e972d11d3b9b663c3ac0b5575c4deb88.zip
fix(paste): escape control characters in Cmdline mode
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r--test/functional/api/vim_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index f4a7d38d31..af6872760a 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -1097,6 +1097,18 @@ describe('API', function()
:Foo^ |
]])
end)
+ it('pasting text with control characters in Cmdline mode', function()
+ local screen = Screen.new(20, 4)
+ screen:attach()
+ feed(':')
+ nvim('paste', 'normal! \023\022\006\027', true, -1)
+ screen:expect([[
+ |
+ ~ |
+ ~ |
+ :normal! ^W^V^F^[^ |
+ ]])
+ end)
it('crlf=false does not break lines at CR, CRLF', function()
nvim('paste', 'line 1\r\n\r\rline 2\nline 3\rline 4\r', false, -1)
expect('line 1\r\n\r\rline 2\nline 3\rline 4\r')