This commit is contained in:
jiahua.liu 2020-02-18 15:01:19 +08:00
parent 3844ef3311
commit 83d4375de3
2 changed files with 4 additions and 2 deletions

View File

@ -482,7 +482,9 @@ object MiraiConsoleTerminalUI : MiraiConsoleUI {
val width = terminal.terminalSize.columns - 6
var x = string
while (true) {
if (x == "") break
if (x == "") {
break
}
val toWrite = if (x.actualLength() > width) {
val index = x.getSubStringIndexByActualLength(width)
x.substring(0, index).also {

View File

@ -300,7 +300,7 @@ object MiraiConsole {
if (allDown) {
return
}
var fullCommand = commandChannel.poll()
var fullCommand = commandChannel.take(1)[0]
if (fullCommand != null) {
if (!fullCommand.startsWith("/")) {
fullCommand = "/$fullCommand"