aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2015-03-16 16:55:12 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2015-03-16 16:55:12 -0400
commit39b5f8728fdd215217d2749c20a2668ecbb5f080 (patch)
tree603e845b6683f6725593c8f12e69183156b6c5c2 /modules/textadept/find.lua
parentcb3e886bba78a040d486af518d491cc191cebfd8 (diff)
downloadtextadept-39b5f8728fdd215217d2749c20a2668ecbb5f080.tar.gz
textadept-39b5f8728fdd215217d2749c20a2668ecbb5f080.zip
Code cleanup based on the output of luacheck, a Lua linter.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r--modules/textadept/find.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 35ce74eb..fe75107f 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -270,7 +270,8 @@ local function replace(rtext)
rtext = rtext:gsub('%%'..i, (M.captures[i]:gsub('%%', '%%%%')))
end
end
- local ok, rtext = pcall(string.gsub, rtext, '%%(%b())', function(code)
+ local ok
+ ok, rtext = pcall(string.gsub, rtext, '%%(%b())', function(code)
code = code:gsub('[\a\b\f\n\r\t\v\\]', escapes)
local result = assert(load('return '..code))()
return tostring(result):gsub('\\[abfnrtv\\]', escapes)
@@ -380,7 +381,7 @@ events.connect(events.KEYPRESS, function(code)
return true
end
end)
-events.connect(events.DOUBLE_CLICK, function(pos, line)
+events.connect(events.DOUBLE_CLICK, function(_, line)
if is_ff_buf(buffer) then M.goto_file_found(line) end
end)