aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/map_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:23:01 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:23:01 +0000
commit142d9041391780ac15b89886a54015fdc5c73995 (patch)
tree0f6b5cac1a60810a03f52826c9e67c9e2780b033 /test/functional/ex_cmds/map_spec.lua
parentad86b5db74922285699ab2a1dbb2ff20e6268a33 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-142d9041391780ac15b89886a54015fdc5c73995.tar.gz
rneovim-142d9041391780ac15b89886a54015fdc5c73995.tar.bz2
rneovim-142d9041391780ac15b89886a54015fdc5c73995.zip
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'test/functional/ex_cmds/map_spec.lua')
-rw-r--r--test/functional/ex_cmds/map_spec.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/functional/ex_cmds/map_spec.lua b/test/functional/ex_cmds/map_spec.lua
index c6bdd017bd..ec912053b2 100644
--- a/test/functional/ex_cmds/map_spec.lua
+++ b/test/functional/ex_cmds/map_spec.lua
@@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
local eq = helpers.eq
local exec = helpers.exec
+local exec_capture = helpers.exec_capture
local feed = helpers.feed
local meths = helpers.meths
local clear = helpers.clear
@@ -30,12 +31,12 @@ describe(':*map', function()
expect('-foo-')
end)
- it('shows <nop> as mapping rhs', function()
+ it('shows <Nop> as mapping rhs', function()
command('nmap asdf <Nop>')
eq([[
n asdf <Nop>]],
- helpers.exec_capture('nmap asdf'))
+ exec_capture('nmap asdf'))
end)
it('mappings with description can be filtered', function()
@@ -48,7 +49,7 @@ n asdf3 qwert
do the other thing
n asdf1 qwert
do the one thing]],
- helpers.exec_capture('filter the nmap'))
+ exec_capture('filter the nmap'))
end)
it('<Plug> mappings ignore nore', function()
@@ -84,6 +85,12 @@ n asdf1 qwert
eq(2, meths.eval('x'))
eq('Some te', eval("getline('.')"))
end)
+
+ it(':unmap with rhs works when lhs is in another bucket #21530', function()
+ command('map F <Plug>Foo')
+ command('unmap <Plug>Foo')
+ eq('\nNo mapping found', exec_capture('map F'))
+ end)
end)
describe('Screen', function()
@@ -161,6 +168,7 @@ describe('Screen', function()
]])
end)
+ -- oldtest: Test_expr_map_restore_cursor()
it('cursor is restored after :map <expr> which redraws statusline vim-patch:8.1.2336', function()
exec([[
call setline(1, ['one', 'two', 'three'])
@@ -246,6 +254,7 @@ describe('Screen', function()
]])
end)
+ -- oldtest: Test_map_listing()
it('listing mappings clears command line vim-patch:8.2.4401', function()
screen:try_resize(40, 5)
command('nmap a b')