diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/input/TextInputPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/input/TextInputPanel.kt index fb9d10ba8..3c8c9ea5d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/input/TextInputPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/input/TextInputPanel.kt @@ -894,7 +894,7 @@ open class TextInputPanel( pushbackSnapshot() if (multiLine) { - val insert = minecraft.keyboardHandler.clipboard.replace("\t", " ").split(NEWLINES).toMutableList() + val insert = minecraft.keyboardHandler.clipboard.replace("\t", " ").filter { acceptsCharacter(it) }.split(NEWLINES).toMutableList() val actualLastSize = insert.lastOrNull()?.length ?: 0 val line = this[cursorLine] @@ -933,7 +933,7 @@ open class TextInputPanel( cursorRow = actualLastSize } } else { - val insert = minecraft.keyboardHandler.clipboard.replace("\t", " ").replace(NEWLINES, "") + val insert = minecraft.keyboardHandler.clipboard.replace("\t", " ").replace(NEWLINES, "").filter { acceptsCharacter(it) } val line = this[cursorLine] if (line == null) {