fix(api): use E226 instead of E227 for duplicate abbreviation (#33159)

This commit is contained in:
zeertzjq
2025-03-30 07:12:01 +08:00
committed by GitHub
parent 5f9f5bc04d
commit 99529577cc
2 changed files with 9 additions and 1 deletions

View File

@@ -814,6 +814,12 @@ describe('nvim_set_keymap, nvim_del_keymap', function()
'E227: Mapping already exists for <tab>',
pcall_err(api.nvim_set_keymap, 'n', '<tab>', 'rhs', { unique = true })
)
api.nvim_set_keymap('ia', 'lhs', 'rhs', {})
eq(
'E226: Abbreviation already exists for lhs',
pcall_err(api.nvim_set_keymap, 'ia', 'lhs', 'rhs', { unique = true })
)
end)
it('can set <expr> mappings whose RHS change dynamically', function()