Skip to content

Commit 3ca305c

Browse files
committed
legacy generate handles action = ""
1 parent 00be1db commit 3ca305c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/nvim-tree/keymap-legacy.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ local function generate_on_attach_function(list, unmapped_keys, remove_defaults)
179179
end
180180

181181
local function generate_on_attach_lua(list, unmapped_keys, remove_defaults)
182-
local lua = BEGIN_ON_ATTACH .. "\n"
182+
local lua = BEGIN_ON_ATTACH
183183

184184
if remove_defaults then
185185
-- no defaults
186186
lua = lua .. "\n -- remove_keymaps = true OR view.mappings.custom_only = true\n"
187187
else
188188
-- defaults with explicit removals
189-
lua = lua .. DEFAULT_ON_ATTACH
189+
lua = lua .. "\n" .. DEFAULT_ON_ATTACH .. "\n"
190190
if #unmapped_keys > 0 then
191191
lua = lua .. '\n -- remove_keymaps, action = ""\n'
192192
end

0 commit comments

Comments
 (0)