SessionCtl // Stable-sort the lookup results.

This commit is contained in:
ShikiSuen 2022-10-24 10:49:29 +08:00
parent 7a4aa38df5
commit 714632e1c8
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ extension SessionCtl: CtlCandidateDelegate {
if value.isEmpty { return "" } // 西
if value.contains("_") { return "" }
guard let lookupResult = LMMgr.currentLM.currentCassette.reverseLookupMap[value] else { return "" }
return lookupResult.joined(separator: " ")
return lookupResult.stableSort(by: { $0.count < $1.count }).joined(separator: " ")
}
public var selectionKeys: String {