mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix saving file drop saving for "all" (#967)
This commit is contained in:
parent
f675f15d0b
commit
fe910a26ed
@ -5,6 +5,9 @@ Change Log
|
||||
4.0.9 (471)
|
||||
--------------------------
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue that File Drop settings were not saved if both the extensions and syntax styles are for “all.”
|
||||
|
||||
|
||||
|
||||
|
@ -190,7 +190,7 @@ final class FileDropPaneController: NSViewController, NSTableViewDelegate, NSTex
|
||||
// sanitize
|
||||
let sanitized = content
|
||||
.map { $0.filter { !($0.key == FileDropItem.CodingKeys.extensions.rawValue && $0.value.isEmpty) } }
|
||||
.filter { $0[FileDropItem.CodingKeys.extensions.rawValue] != nil || $0[FileDropItem.CodingKeys.scope.rawValue] != nil }
|
||||
.filter { $0[FileDropItem.CodingKeys.format.rawValue] != nil }
|
||||
|
||||
// check if the new setting is different from the default
|
||||
let defaultSetting = UserDefaults.standard.registeredValue(for: .fileDropArray)
|
||||
|
Loading…
Reference in New Issue
Block a user