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

DiffScreen.draw() marks wrong line as dirty when wrapping occurs #36

Closed
dcoshea opened this issue Jul 23, 2015 · 3 comments
Closed

DiffScreen.draw() marks wrong line as dirty when wrapping occurs #36

dcoshea opened this issue Jul 23, 2015 · 3 comments

Comments

@dcoshea
Copy link

dcoshea commented Jul 23, 2015

The current implementation of DiffScreen.draw() in pyte/screens.py as at 12276a8 is that it first marks the row containing the cursor as dirty and then calls Screen.draw().

However, the latter method will, if wrapping is enabled (if mo.DECAWM in self.mode), move to the next line before actually writing the character to the virtual terminal. This means that the wrong line might have been marked as dirty.

It seems to me that simply switching the order of the statements in DiffScreen.draw() would fix this issue.

@superbobry
Copy link
Collaborator

Thank you for reporting this. It seems that with wrapping enable the dirty line would indeed by y + 1 and not y. Do you mind submitting a PR with a unit-test for this case?

@dcoshea
Copy link
Author

dcoshea commented Jul 23, 2015

Sure, thanks!

dcoshea pushed a commit to dcoshea/pyte that referenced this issue Jul 24, 2015
@dcoshea
Copy link
Author

dcoshea commented Jul 24, 2015

I submitted pull request #38, hope it's ok :)

dcoshea pushed a commit to dcoshea/pyte that referenced this issue Jul 24, 2015
superbobry added a commit that referenced this issue Jul 24, 2015
Fix #36 - DiffScreen.draw() marks wrong line as dirty when wrapping occurs.
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