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

[REQUEST] Consider implicitly including terminal coordinate system origin in cursor movements #60

Closed
bczsalba opened this issue May 16, 2022 · 1 comment
Labels
Enhancement New feature or request

Comments

@bczsalba
Copy link
Owner

Is your feature request related to a problem? Please describe.
When using any of the cursor-moving API (such as cursor_at, terminal.print(..., pos=...) and others) the user has to manually include the terminal origin to get the desired result. This could, and should just be done implicitly by the library.

Describe the solution you'd like
All of these methods should just include the origin by default. It would be ideal for them all to call a central function that does it this way, which would perfectly coincide with my desires to separate ansi_interface functionality into its own unit, including a class and instance for the terminal's cursor. This could then just be called with a position (such as ptg.cursor.move(pos)), and that action would just include the origin.

Additional context
s/o to #55 and #53 for exposing this issue, both started by the now very important library tester @leftbones.

@bczsalba bczsalba added the Enhancement New feature or request label May 16, 2022
@bczsalba
Copy link
Owner Author

Now the terminal's write method includes the origin, so this issue is practically fixed. Including it in other places is messy, since move_cursor's module (ansi_interface) doesn't have access to the terminal's origin.

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

No branches or pull requests

1 participant