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
7474 'svg', 'tga', 'tif', 'tiff', 'webp'
7575 }
7676
77−local EXTENSIONS = {}
78−local EXTENSIONS_VIDEO = {}
79−local EXTENSIONS_AUDIO = {}
80−local EXTENSIONS_IMAGES = {}
77+local EXTENSIONS
78+local EXTENSIONS_VIDEO
79+local EXTENSIONS_AUDIO
80+local EXTENSIONS_IMAGES
8181
8282 local function SetUnion (a,b)
8383 for k in pairs(b) do a[k] = true end
@@ -137,6 +137,10 @@ local function split_patterns() · 53 unmodified lines
137137 end
138138
139139 local function create_extensions()
140+ EXTENSIONS = {}
141+ EXTENSIONS_VIDEO = {}
142+ EXTENSIONS_AUDIO = {}
143+ EXTENSIONS_IMAGES = {}
140144 if o.videos then
141145 SetUnion(SetUnion(EXTENSIONS_VIDEO, EXTENSIONS_VIDEO_DEFAULT), o.additional_video_exts)
142146 SetUnion(EXTENSIONS, EXTENSIONS_VIDEO)
@@ -169,6 +173,9 @@ options.read_options(o, nil, function(list) · 26 unmodified lines
169173 if list.directory_mode then
170174 validate_directory_mode()
171175 end
176+ if list.ignore_patterns then
177+ split_patterns()
178+ end
172179 end)
173180
174181 split_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