File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change 2222--- @param keymap table
2323--- @return table normalized
2424local function normalize_keymap (keymap )
25+ local to_return = {}
2526 -- Keys which must be manually edited
26- keymap .buffer = keymap .buffer > 0 and keymap .buffer or nil
27- keymap .rhs = keymap .callback or keymap .rhs
27+ to_return .buffer = keymap .buffer > 0 and keymap .buffer or nil
28+ to_return .rhs = keymap .callback or keymap .rhs
2829
2930 -- Keys which are `v:true` or `v:false`
30- keymap .expr = globals .is_true (keymap .expr )
31- keymap .noremap = globals .is_true (keymap .noremap )
32- keymap .nowait = globals .is_true (keymap .nowait )
33- keymap .silent = globals .is_true (keymap .silent )
34-
35- -- Keys which should not exist
36- keymap .callback = nil
37- keymap .lhs = nil
38- keymap .lnum = nil
39- keymap .mode = nil
40- keymap .script = nil
41- keymap .sid = nil
42- keymap .lhsraw = nil
43-
44- return keymap
31+ to_return .expr = globals .is_true (keymap .expr )
32+ to_return .noremap = globals .is_true (keymap .noremap )
33+ to_return .nowait = globals .is_true (keymap .nowait )
34+ to_return .script = globals .is_true (keymap .script )
35+ to_return .silent = globals .is_true (keymap .silent )
36+
37+ to_return .desc = keymap .desc
38+ return to_return
4539end
4640
4741--- remove and return the right-hand side of a `keymap`.
You can’t perform that action at this time.
0 commit comments