Tabs don't render properly loal
This commit is contained in:
parent
b62ac72bc5
commit
7299238fc9
@ -503,43 +503,6 @@ open class TextInputPanel<out S : Screen>(
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user