From 7299238fc90d844cb5db96a722780a194d263401 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 25 Jan 2023 21:03:49 +0700 Subject: [PATCH] Tabs don't render properly loal --- .../client/screen/panels/TextInputPanel.kt | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/TextInputPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/TextInputPanel.kt index 0b4cb9411..d44f5e468 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/TextInputPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/TextInputPanel.kt @@ -503,43 +503,6 @@ open class TextInputPanel( } } - if (key == InputConstants.KEY_TAB) { - if (multiLine) { - val lines = if (selections.isNotEmpty()) selections.keys else listOf(cursorLine) - - if (minecraft.window.isKeyDown(InputConstants.KEY_RSHIFT) || minecraft.window.isKeyDown(InputConstants.KEY_LSHIFT)) { - var hit = false - - for (lineNumber in lines) { - val line = this[lineNumber]!! - - if (line[0] == '\t') { - if (!hit) { - hit = true - recordHistory(true) - } - - this[lineNumber] = line.substring(1) - moveCursors(lineNumber, 1, -1) - } - } - } else { - if (lines.isNotEmpty()) - recordHistory(true) - - for (lineNumber in lines) { - this[lineNumber] = "\t" + this[lineNumber]!! - moveCursors(lineNumber, 0, 1) - } - } - - return true - } - - killFocus() - return true - } - if (key == InputConstants.KEY_LEFT) { if (!minecraft.window.isShiftDown) { advanceCursorLeft(minecraft.window.isCtrlDown)