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

func MoveCursor(x, y uint16) error #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gon555551
Copy link

Added MoveCursor function to move the cursor anywhere on the terminal, both on clear_others.go and clear_windows.go.

The function takes uint16 as opposed to short (int16) because there are no negative coordinates. On windows also changed the coords{x, y} struct to take in uint16 rather than short.

Added outOfRange error so the function can return it if the coordinates are out of range of the terminal size (screen.Size()).

Added a function call to the example (main) package.

Ran go mod tidy.

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

Successfully merging this pull request may close these issues.

1 participant