mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 00:47:26 -04:00
node text input: don't remove .
for internal commands
This commit is contained in:
parent
097e7b9174
commit
2868da6070
@ -121,11 +121,13 @@ class NodeTextInputElement(
|
||||
}
|
||||
|
||||
fun updateSuggestion(suggestion: Suggestion) {
|
||||
val slash = value.startsWith("/")
|
||||
var value = SuggestionUtil.apply(value.removePrefix("/"), suggestion)
|
||||
if (slash) {
|
||||
value = "/$value" // TODO: dirty hack
|
||||
val prefix = when { // TODO: really dirty dirty hack to not remove the / or . before the command. ChatNode should be responsible for that
|
||||
value.startsWith("/") -> "/"
|
||||
value.startsWith(".") -> "."
|
||||
else -> ""
|
||||
}
|
||||
var value = SuggestionUtil.apply(value.removePrefix(prefix), suggestion)
|
||||
value = prefix + value
|
||||
_set(value)
|
||||
forceApply()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user