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 buffer does not clear internal buffer. #41

Closed
imdaveho opened this issue Nov 14, 2018 · 4 comments
Closed

Flush buffer does not clear internal buffer. #41

imdaveho opened this issue Nov 14, 2018 · 4 comments
Assignees
Labels

Comments

@imdaveho
Copy link
Contributor

    terminal(&screen).clear(ClearType::All);
    cursor(&screen).goto(0, 0);
    screen.write_buf(b"https://www.google.com").expect("");
    screen.flush_buf().expect("");
    cursor(&screen).goto(4, 0);
    screen.write_buf(b"FFF").expect("");
    screen.flush_buf().expect("");

expecting the result to be:

httpFFF/www.google.com

actual:

httphttps://www.google.comFFF

seems like code isn't synchronous here...

@TimonPost
Copy link
Member

TimonPost commented Nov 14, 2018

Thanks for leaving the issue. I think I know what is going wrong here.

If you check out the flush functioning you can see that the inner buffer of Screen does not clear (makes empty) the buffer. I can fix this fast, but does this have priority for you?

@TimonPost TimonPost self-assigned this Nov 14, 2018
@TimonPost TimonPost added the bug label Nov 14, 2018
@imdaveho
Copy link
Contributor Author

imdaveho commented Nov 14, 2018 via email

@TimonPost TimonPost changed the title cursor.goto and screen.write_buf conflict when rendering to screen? Flush buffer does not clear internal buffer. Nov 14, 2018
@TimonPost
Copy link
Member

See #42.

@TimonPost
Copy link
Member

I've released a new version please check out version: 0.4.3

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

No branches or pull requests

2 participants