From dc5187f9ec70a1ca92b0e81857bb5e042d1250fb Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 8 Dec 2018 23:50:22 -0500 Subject: Only pass command entry text to finish mode function. Silently passing second length parameter can cause subtle bugs in functions that accept more than one parameter. --- modules/textadept/command_entry.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index 214241a4..f5fef2f6 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -103,7 +103,7 @@ end function M.finish_mode(f) if M:auto_c_active() then return false end -- allow Enter to autocomplete M.enter_mode(nil) - if f then f(M:get_text()) end + if f then f((M:get_text())) end end -- Environment for abbreviated Lua commands. -- cgit v1.2.3