+4
-4
lines changedFilter options
+4
-4
lines changed Original file line number Diff line number Diff line change
@@ -2025,7 +2025,7 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
2025
2025
{rhs} string|function Right-hand side |{rhs}| of the
2026
2026
mapping. Can also be a Lua function. If a Lua
2027
2027
function and `opts.expr == true`, returning `nil`
2028
-
or `false` is equivalent to an empty string.
2028
+
is equivalent to an empty string.
2029
2029
{opts} table A table of |:map-arguments| such as
2030
2030
"silent". In addition to the options listed in
2031
2031
|nvim_set_keymap()|, this table also accepts the
Original file line number Diff line number Diff line change
@@ -35,8 +35,8 @@ local keymap = {}
35
35
--- Can also be list of modes to create mapping on multiple modes.
36
36
---@param lhs string Left-hand side |{lhs}| of the mapping.
37
37
---@param rhs string|function Right-hand side |{rhs}| of the mapping. Can also be a Lua function.
38
-
--- If a Lua function and `opts.expr == true`, returning `nil` or `false`
39
-
--- is equivalent to an empty string.
38
+
--- If a Lua function and `opts.expr == true`, returning `nil` is
39
+
--- equivalent to an empty string.
40
40
--
41
41
---@param opts table A table of |:map-arguments| such as "silent". In addition to the options
42
42
--- listed in |nvim_set_keymap()|, this table also accepts the following keys:
@@ -62,7 +62,7 @@ function keymap.set(mode, lhs, rhs, opts)
62
62
local user_rhs = rhs
63
63
rhs = function ()
64
64
local res = user_rhs()
65
-
if not res then
65
+
if res == nil then
66
66
-- TODO(lewis6991): Handle this in C?
67
67
return ''
68
68
elseif opts.replace_keycodes ~= false then
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4