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

View Move and ViewToScreen shouldn't use Clipped parameter as true by default but only for cursor. #2719

Closed
BDisp opened this issue Jun 16, 2023 · 0 comments

Comments

@BDisp
Copy link
Collaborator

BDisp commented Jun 16, 2023

To draw we shouldn't use the clipped parameter as true by default, otherwise View methods like Clear, which use the Move will clearing wrong area. The clipped parameter should only be used as true for cursor purpose if we want it always visible on the screen boundary, but never to draw views.

		internal Rect ViewToScreen (Rect region)
		{
			ViewToScreen (region.X, region.Y, out var x, out var y, clipped: false);
			return new Rect (x, y, region.Width, region.Height);
		}

For that reason this method always call the ViewToScreen with the parameter clipped as false. If we want the cursor always visible the we use the clipped as true when the cursor is updating and not redrawing, otherwise the output will be corrupted.

BDisp added a commit to BDisp/Terminal.Gui that referenced this issue Jun 16, 2023
…arameter as true by default but only for cursor.
@tig tig closed this as completed in db78fe2 Jul 5, 2023
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

1 participant