goterm icon indicating copy to clipboard operation
goterm copied to clipboard

Flush Issues

Open LambdaExpression opened this issue 8 years ago • 1 comments

File : terminal.go

// Flush buffer and ensure that it will not overflow screen
func Flush() {
	for idx, str := range strings.Split(Screen.String(), "\n") {
		if idx > Height() {
			return
		}

		Output.WriteString(str + "\n")
	}

	Output.Flush()
	Screen.Reset()
}

This use "return" ,don't use "break" What is the reason for that? Don't has error message ,user don't kown

(English is relatively poor, hope forgive me)

LambdaExpression avatar Dec 12 '17 07:12 LambdaExpression

I encounter the same issue with this and had to scratch my head for a couple of hours. I think it was intended to limit the number of lines can be redrawed, so that on overlap texts on the terminal screen. But I agree with you, there should be a text/indicator/fallback mechanism to handle this gracefully

capt4ce avatar Nov 12 '19 09:11 capt4ce