From ca8f28406427ebbd7d50a06b3b73dab77bacd159 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 5 Jun 2022 14:56:03 +0800 Subject: [PATCH] InputState // Bind allowBoostingSingleKanjiAsUserPhrase. --- Source/Modules/ControllerModules/InputState.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Modules/ControllerModules/InputState.swift b/Source/Modules/ControllerModules/InputState.swift index 65286924..248a81f2 100644 --- a/Source/Modules/ControllerModules/InputState.swift +++ b/Source/Modules/ControllerModules/InputState.swift @@ -153,7 +153,7 @@ class InputState { /// Represents that the user is marking a range in the composing buffer. class Marking: NotEmpty { - private var allowedMarkRange = 2...mgrPrefs.maxCandidateLength + private var allowedMarkRange: ClosedRange = mgrPrefs.minCandidateLength...mgrPrefs.maxCandidateLength private(set) var markerIndex: Int = 0 { didSet { markerIndex = max(markerIndex, 0) } } private(set) var markedRange: Range private var literalMarkedRange: Range { @@ -161,6 +161,7 @@ class InputState { let upperBoundLiteral = composingBuffer.charIndexLiteral(from: markedRange.upperBound) return lowerBoundLiteral..