-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Make ncdirect cursor acquisition more reliable #784
Comments
I need to revert the dumb inversion in order to fix #964, so that's going to break |
Gonna go ahead and try to knock this out today. Acceptance criteria is that |
I've rewired |
Initial testing indicates that this is a solid fix. |
See #765, where it's revealed that kmscon hands back cursor + row in reverse order from most everything else. We could of course hardwire a bunch of special cases, and hope we get them all, and hope they don't change behavior, like a dumb jabroni. Much better would be to autodetect this. It ought be doable via:
(1) get cursor position
(2) move to the right
(3) move up
(4) get cursor position
(5) if unchanged, either it's broken, or we're in the upper right corner. we can determine the latter by checking against terminal dimensions. in this case, move somewhere else and retry. either way, move back to the original position.
(6) if only one has changed, we were either on the right side, or top line (but not upper right corner)
(7) if both changed, look at the values
we could run this on app startup, or whenever
ncdirect_cursor_yx()
is first called.The text was updated successfully, but these errors were encountered: