fix: stop vim keys preference disabling on launch (closes #2919)
This commit is contained in:
1 parent
3b0194d886
commit
53692ffc7c
1 file changed
+4
-2
@@ -235,7 +235,7 @@ class ControlsTab {
|
|||||||
"j": "vimCycleDown"
|
"j": "vimCycleDown"
|
||||||
]
|
]
|
||||||
if (sender as! NSButton).state == .on {
|
if (sender as! NSButton).state == .on {
|
||||||
if App.app.preferencesWindow != nil && isClearVimKeysSuccessful() {
|
if isClearVimKeysSuccessful() {
|
||||||
keyActions.forEach { addShortcut(.down, .local, Shortcut(keyEquivalent: $0)!, $1, nil) }
|
keyActions.forEach { addShortcut(.down, .local, Shortcut(keyEquivalent: $0)!, $1, nil) }
|
||||||
} else {
|
} else {
|
||||||
(sender as! NSButton).state = .off
|
(sender as! NSButton).state = .off
|
||||||
@@ -257,7 +257,9 @@ class ControlsTab {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !conflicts.isEmpty {
|
if !conflicts.isEmpty {
|
||||||
if !shouldClearConflictingShortcuts(conflicts.map { $0.value }) {
|
// if the app is still launching (App.app.preferencesWindow == nil) and we have a conflict
|
||||||
|
// then we don't show the user a dialog, and simply disable vim keys
|
||||||
|
if App.app.preferencesWindow == nil || !shouldClearConflictingShortcuts(conflicts.map { $0.value }) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
conflicts.forEach {
|
conflicts.forEach {
|
||||||
|
|||||||
Reference in new issue
Block a user