aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/digraph.c4
-rw-r--r--test/functional/options/keymap_spec.lua156
2 files changed, 80 insertions, 80 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index bc4c12e0b7..ffd13da48b 100644
--- a/src/nvim/digraph.c
+++ b/src/nvim/digraph.c
@@ -1827,12 +1827,12 @@ void ex_loadkeymap(exarg_T *eap)
xfree(line);
}
- // setup ":lnoremap" to map the keys
+ // setup ":lmap" to map the keys
for (int i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) {
vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s %s",
((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from,
((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].to);
- (void)do_map(2, buf, LANGMAP, FALSE);
+ (void)do_map(0, buf, LANGMAP, FALSE);
}
p_cpo = save_cpo;
diff --git a/test/functional/options/keymap_spec.lua b/test/functional/options/keymap_spec.lua
index e1424cb8fe..43fd1eb990 100644
--- a/test/functional/options/keymap_spec.lua
+++ b/test/functional/options/keymap_spec.lua
@@ -17,94 +17,94 @@ describe("'keymap' / :lmap", function()
feed('gg0')
end)
- describe("'keymap' as :lnoremap", function()
- -- Shows that 'keymap' sets language mappings without allowing
- -- remapping of those mappings.
- -- This equivalence allows us to only test :lmap commands and assert
- -- they behave the same as 'keymap' settings.
+ describe("'keymap' as :lmap", function()
+ -- Shows that 'keymap' sets language mappings that allows remapping.
+ -- This equivalence allows us to only test :lmap commands and assert they
+ -- behave the same as 'keymap' settings.
-- It does rely on the absence of special code that implements 'keymap'
-- and :lmap differently but shows mappings from the 'keymap' after
-- typing :lmap.
+ -- At the moment this is the case.
it("'keymap' mappings are shown with :lmap", function()
command('lmapclear')
command('lmapclear <buffer>')
command('set keymap=dvorak')
command('set nomore')
local bindings = funcs.nvim_command_output('lmap')
- eq(bindings, dedent([[
+ eq(dedent([[
- l " *@_
- l ' *@-
- l + *@}
- l , *@w
- l - *@[
- l . *@v
- l / *@z
- l : *@S
- l ; *@s
- l < *@W
- l = *@]
- l > *@V
- l ? *@Z
- l A *@A
- l B *@X
- l C *@J
- l D *@E
- l E *@>
- l F *@U
- l G *@I
- l H *@D
- l I *@C
- l J *@H
- l K *@T
- l L *@N
- l M *@M
- l N *@B
- l O *@R
- l P *@L
- l Q *@"
- l R *@P
- l S *@O
- l T *@Y
- l U *@G
- l V *@K
- l W *@<
- l X *@Q
- l Y *@F
- l Z *@:
- l [ *@/
- l \ *@\
- l ] *@=
- l _ *@{
- l a *@a
- l b *@x
- l c *@j
- l d *@e
- l e *@.
- l f *@u
- l g *@i
- l h *@d
- l i *@c
- l j *@h
- l k *@t
- l l *@n
- l m *@m
- l n *@b
- l o *@r
- l p *@l
- l q *@'
- l r *@p
- l s *@o
- l t *@y
- l u *@g
- l v *@k
- l w *@,
- l x *@q
- l y *@f
- l z *@;
- l { *@?
- l | *@|
- l } *@+]]))
+ l " @_
+ l ' @-
+ l + @}
+ l , @w
+ l - @[
+ l . @v
+ l / @z
+ l : @S
+ l ; @s
+ l < @W
+ l = @]
+ l > @V
+ l ? @Z
+ l A @A
+ l B @X
+ l C @J
+ l D @E
+ l E @>
+ l F @U
+ l G @I
+ l H @D
+ l I @C
+ l J @H
+ l K @T
+ l L @N
+ l M @M
+ l N @B
+ l O @R
+ l P @L
+ l Q @"
+ l R @P
+ l S @O
+ l T @Y
+ l U @G
+ l V @K
+ l W @<
+ l X @Q
+ l Y @F
+ l Z @:
+ l [ @/
+ l \ @\
+ l ] @=
+ l _ @{
+ l a @a
+ l b @x
+ l c @j
+ l d @e
+ l e @.
+ l f @u
+ l g @i
+ l h @d
+ l i @c
+ l j @h
+ l k @t
+ l l @n
+ l m @m
+ l n @b
+ l o @r
+ l p @l
+ l q @'
+ l r @p
+ l s @o
+ l t @y
+ l u @g
+ l v @k
+ l w @,
+ l x @q
+ l y @f
+ l z @;
+ l { @?
+ l | @|
+ l } @+]]), bindings)
end)
end)
describe("'iminsert' option", function()