diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/AutoCompleter.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/AutoCompleter.kt index be5f9c0bb4..5d309085ba 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/AutoCompleter.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/AutoCompleter.kt @@ -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 }