From 6b9d51dea8066e8614517d7dffe2c1755a585b4a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 25 Feb 2011 17:04:11 -0500 Subject: Escape pattern chars when searching apidoc; modules/textadept/adeptsense.lua --- modules/textadept/adeptsense.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/textadept/adeptsense.lua') diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua index 63282680..52569d6e 100644 --- a/modules/textadept/adeptsense.lua +++ b/modules/textadept/adeptsense.lua @@ -542,7 +542,7 @@ function get_apidoc(sense, symbol, raw) local entity, func = symbol:match('^(.-)[^%w_]*([%w_]+)$') if raw then entity, func = '', symbol end local c = func:sub(1, 1) -- for quick comparison - local patt = '^'..func..'%s+(.+)$' + local patt = '^'..func:gsub('([%.%-])', '%%%1')..'%s+(.+)$' for _, file in ipairs(sense.api_files) do if lfs.attributes(file) then for line in io.lines(file) do -- cgit v1.2.3