Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush Issues #20

Open
LambdaExpression opened this issue Dec 12, 2017 · 1 comment
Open

Flush Issues #20

LambdaExpression opened this issue Dec 12, 2017 · 1 comment

Comments

@LambdaExpression
Copy link

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)

@capt4ce
Copy link

capt4ce commented Nov 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants