Skip to content

Commit 2b6f676

Browse files
committed
Fixed: help items for methods and constructors can be found with either "." or ":"
1 parent 885394f commit 2b6f676

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/help.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ local function search(helpitem)
117117
searchfor(helpitem:capitalize(), "property", write_property) or
118118
searchfor(helpitem, "property", write_property) or
119119
searchfor(helpitem:capitalize(), "method", write_method) or
120-
searchfor(helpitem, "method", write_method) or
120+
searchfor(helpitem:gsub(":", "."), "constructor", write_method) or
121+
searchfor(helpitem:gsub("%.", ":"), "method", write_method) or
121122
searchfor(helpitem, "%(", write_function)
122123
if not result then
123124
console.writecolor("lightred", "no help entry for ")
@@ -126,4 +127,5 @@ local function search(helpitem)
126127
end
127128
console.write("\n")
128129
end
129-
search (arg[2])
130+
131+
return search

0 commit comments

Comments
 (0)