mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-24 04:57:50 -04:00
cli: add space if overlapping text length == 0
This commit is contained in:
parent
d1451bd863
commit
00e73c693e
@ -117,7 +117,13 @@ class NodeTextInputElement(
|
||||
|
||||
fun updateSuggestion(suggestion: Any) {
|
||||
val string = suggestion.toString()
|
||||
_set(value + string.substring(KUtil.getOverlappingText(value, string), string.length))
|
||||
val overlappingLength = KUtil.getOverlappingText(value, string)
|
||||
var nextValue = value
|
||||
if (overlappingLength == 0) {
|
||||
nextValue += " " // ToDo: Not 100% correct, check for word separator
|
||||
}
|
||||
nextValue += string.substring(overlappingLength, string.length)
|
||||
_set(nextValue)
|
||||
forceApply()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user