Pill-AutoComplete: add newline as word separator

Closes https://github.com/SchildiChat/SchildiChat-android/issues/122

Change-Id: Ie6c86aaf571aadd1e4977a1503c7d76f00c6d052
This commit is contained in:
SpiritCroc 2022-05-13 20:57:08 +02:00
parent d1ee0dea6b
commit 45c4f632e7

View file

@ -228,7 +228,7 @@ class AutoCompleter @AssistedInject constructor(
}
// Detect next word separator
var endIndex = editable.indexOf(" ", startIndex)
var endIndex = editable.indexOfAny(listOf(" ", "\n"), startIndex)
if (endIndex == -1) {
endIndex = editable.length
}