diff options
Diffstat (limited to 'core/file_io.lua')
-rw-r--r-- | core/file_io.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index 8e252790..bd018e5a 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -370,7 +370,8 @@ io.quick_open_filters = {} -- If *paths* is `nil`, uses the current project's root directory, which is -- obtained from `io.get_project_root()`. -- Files shown in the dialog do not match any pattern in either string or table --- *filter* (or `lfs.FILTER` if *filter* is `nil`). A filter table contains: +-- *filter* (or `lfs.default_filter` if *filter* is `nil`). A filter table +-- contains: -- -- + Lua patterns that match filenames to exclude. -- + Optional `folders` sub-table that contains patterns matching directories @@ -386,16 +387,16 @@ io.quick_open_filters = {} -- not match the pattern that follows. The number of files in the list is capped -- at `quick_open_max`. -- If *filter* is `nil` and *paths* is ultimately a string, the filter from the --- `io.quick_open_filters` table is used in place of `lfs.FILTER` if the former --- exists. +-- `io.quick_open_filters` table is used in place of `lfs.default_filter` if the +-- former exists. -- *opts* is an optional table of additional options for -- `ui.dialogs.filteredlist()`. -- @param paths Optional string directory path or table of directory paths to -- search. The default value is the current project's root directory, if -- available. -- @param filter Optional filter for files and directories to exclude. The --- default value is `lfs.FILTER` unless *paths* is a string and a filter for --- it is defined in `io.quick_open_filters`. +-- default value is `lfs.default_filter` unless *paths* is a string and a +-- filter for it is defined in `io.quick_open_filters`. -- @param opts Optional table of additional options for -- `ui.dialogs.filteredlist()`. -- @usage io.quick_open(buffer.filename:match('^.+/')) -- list all files in the @@ -405,7 +406,7 @@ io.quick_open_filters = {} -- @usage io.quick_open('/project', {folders = {'build'}}) -- list all non-built -- files in a project directory -- @see io.quick_open_filters --- @see lfs.FILTER +-- @see lfs.default_filter -- @see quick_open_max -- @see ui.dialogs.filteredlist -- @name quick_open @@ -422,7 +423,7 @@ function io.quick_open(paths, filter, opts) if #utf8_list >= io.quick_open_max then return false end filename = filename:gsub('^%.[/\\]', '') utf8_list[#utf8_list + 1] = filename:iconv('UTF-8', _CHARSET) - end, filter or lfs.FILTER) + end, filter or lfs.default_filter) end if #utf8_list >= io.quick_open_max then local msg = string.format('%d %s %d', io.quick_open_max, |