From 78cdf5d4e0edf72c81dc273ff0c82305c0855725 Mon Sep 17 00:00:00 2001 From: Sam <130783534+Sam-programs@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:51:55 +0300 Subject: [PATCH] fix: use return value of function as keys (#66) --- lua/better_escape.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/better_escape.lua b/lua/better_escape.lua index 010ac2c..010d3a2 100644 --- a/lua/better_escape.lua +++ b/lua/better_escape.lua @@ -121,7 +121,7 @@ local function map_keys() if type(mapping) == "string" then vim.api.nvim_input(mapping) elseif type(mapping) == "function" then - mapping() + vim.api.nvim_input(mapping() or "") end end, map_opts) end