diff options
author | 2020-07-16 17:25:51 -0400 | |
---|---|---|
committer | 2020-07-16 17:25:51 -0400 | |
commit | b35a8dd225b06340022c4971471952c48380b1db (patch) | |
tree | e834bfb5b7767296f2a7bfaabde3aa99b88cf98f /modules | |
parent | 3eb130fd2ef73745b2b9f796abbce7bdd2b88632 (diff) | |
download | textadept-b35a8dd225b06340022c4971471952c48380b1db.tar.gz textadept-b35a8dd225b06340022c4971471952c48380b1db.zip |
Minor LuaDoc updates and spelling corrections.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/editing.lua | 6 | ||||
-rw-r--r-- | modules/textadept/find.lua | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 96e4e351..941d96e6 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -645,12 +645,12 @@ local api_docs -- Symbols are determined by using `buffer.word_chars`. -- @param pos Optional position of the symbol to show documentation for. If -- omitted, the caret position is used. --- @param case_insensitive Optional flag that indicates whether or not to search +-- @param ignore_case Optional flag that indicates whether or not to search -- API files case-insensitively for symbols. The default value is `false`. -- @name show_documentation -- @see api_files -- @see buffer.word_chars -function M.show_documentation(pos, case_insensitive) +function M.show_documentation(pos, ignore_case) if view:call_tip_active() then events.emit(events.CALL_TIP_CLICK) return end local api_files = M.api_files[buffer:get_lexer(true)] if not api_files then return end @@ -663,7 +663,7 @@ function M.show_documentation(pos, case_insensitive) ::lookup:: if symbol ~= '' then local symbol_patt = '^' .. symbol:gsub('(%p)', '%%%1') - if case_insensitive then + if ignore_case then symbol_patt = symbol_patt:gsub('%a', function(ch) return string.format('[%s%s]', ch:upper(), ch:lower()) end) diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 22a6a376..7442276f 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -246,14 +246,16 @@ end}) -- Use the `find_text`, `match_case`, `whole_word`, and `regex` fields to set -- the search text and option flags, respectively. -- A filter determines which files to search in, with the default filter being --- `lfs.default_filter`. A filter consists of Lua patterns that match filenames --- to include or exclude. Exclusive patterns begin with a '!'. If no inclusive --- patterns are given, any filename is initially considered. As a convenience, --- file extensions can be specified literally instead of as a Lua pattern (e.g. --- '.lua' vs. '%.lua$'), and '/' also matches the Windows directory separator --- ('[/\\]' is not needed). +-- `ui.find.find_in_files_filters[dir]` (if it exists) or `lfs.default_filter`. +-- A filter consists of Lua patterns that match filenames to include or exclude. +-- Patterns are inclusive by default. Exclusive patterns begin with a '!'. If no +-- inclusive patterns are given, any filename is initially considered. As a +-- convenience, file extensions can be specified literally instead of as a Lua +-- pattern (e.g. '.lua' vs. '%.lua$'), and '/' also matches the Windows +-- directory separator ('[/\\]' is not needed). -- If *filter* is `nil`, the filter from the `ui.find.find_in_files_filters` --- table is used. If that filter does not exist, `lfs.default_filter` is used. +-- table for *dir* is used. If that filter does not exist, `lfs.default_filter` +-- is used. -- @param dir Optional directory path to search. If `nil`, the user is prompted -- for one. -- @param filter Optional filter for files and directories to exclude. The |