2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-02 19:53:23 +00:00

feat: always print prompt on newline; complete missing linefeed - "\r"

This commit is contained in:
TorchedSammy 2021-04-06 21:12:19 -04:00
parent c0f34fd784
commit 2b01d5edb2

View File

@ -14,7 +14,7 @@ import (
"github.com/akamensky/argparse"
"github.com/bobappleyard/readline"
"github.com/yuin/gopher-lua"
"golang.org/x/term"
)
const version = "0.3.1"
@ -111,6 +111,10 @@ func main() {
}
}
RunInput(input)
termwidth, _, err := term.GetSize(0)
if err != nil { continue }
fmt.Printf("\u001b[7m∆\u001b[0m" + strings.Repeat(" ", termwidth - 1) + "\r")
}
}