mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: key shortcut not working
This commit is contained in:
@@ -24,7 +24,7 @@ internal class KeymapRefresher private constructor() : DatabasePropertiesChanged
|
|||||||
source: DatabaseChangedExtension.Source
|
source: DatabaseChangedExtension.Source
|
||||||
) {
|
) {
|
||||||
if (type != "Keymap") return
|
if (type != "Keymap") return
|
||||||
refresh()
|
refresh(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPropertyChanged(name: String, key: String, value: String) {
|
override fun onPropertyChanged(name: String, key: String, value: String) {
|
||||||
@@ -33,11 +33,13 @@ internal class KeymapRefresher private constructor() : DatabasePropertiesChanged
|
|||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun refresh() {
|
private fun refresh(force: Boolean = false) {
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
|
if (force.not()) {
|
||||||
if (currentKeymap == activeKeymapName) {
|
if (currentKeymap == activeKeymapName) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
currentKeymap = activeKeymapName
|
currentKeymap = activeKeymapName
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user