History

autoload.lua: fix options update

The extensions list needs to be cleared in this case. Also, add the missing split_patterns().

Kacper Michajłow committed 2 years ago

Commit 7d471971 parent fa890821 file · +11 −4Browse files

Unified · Split

TOOLS/lua/autoload.lua+11−4
@@ -74,10 +74,10 @@ local EXTENSIONS_IMAGES_DEFAULT = Set { · 73 unmodified lines
74 'svg', 'tga', 'tif', 'tiff', 'webp'74 'svg', 'tga', 'tif', 'tiff', 'webp'
75}75}
76 76
77local EXTENSIONS = {}77local EXTENSIONS
78local EXTENSIONS_VIDEO = {}78local EXTENSIONS_VIDEO
79local EXTENSIONS_AUDIO = {}79local EXTENSIONS_AUDIO
80local EXTENSIONS_IMAGES = {}80local EXTENSIONS_IMAGES
81 81
82local function SetUnion (a,b)82local function SetUnion (a,b)
83 for k in pairs(b) do a[k] = true end83 for k in pairs(b) do a[k] = true end
@@ -137,6 +137,10 @@ local function split_patterns() · 53 unmodified lines
137end137end
138 138
139local function create_extensions()139local function create_extensions()
140 EXTENSIONS = {}
141 EXTENSIONS_VIDEO = {}
142 EXTENSIONS_AUDIO = {}
143 EXTENSIONS_IMAGES = {}
140 if o.videos then144 if o.videos then
141 SetUnion(SetUnion(EXTENSIONS_VIDEO, EXTENSIONS_VIDEO_DEFAULT), o.additional_video_exts)145 SetUnion(SetUnion(EXTENSIONS_VIDEO, EXTENSIONS_VIDEO_DEFAULT), o.additional_video_exts)
142 SetUnion(EXTENSIONS, EXTENSIONS_VIDEO)146 SetUnion(EXTENSIONS, EXTENSIONS_VIDEO)
@@ -169,6 +173,9 @@ options.read_options(o, nil, function(list) · 26 unmodified lines
169 if list.directory_mode then173 if list.directory_mode then
170 validate_directory_mode()174 validate_directory_mode()
171 end175 end
176 if list.ignore_patterns then
177 split_patterns()
178 end
172end)179end)
173 180
174split_option_exts(true, true, true)181split_option_exts(true, true, true)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t