-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Create Cursor class #2290
Comments
Will a cursor instance then become part of a buffer instance? E.g. |
@mofux I don't think the API surface will change, we want people to adjust the cursor position using |
note to myself: |
Closing as it probably won't end up happening anyway, cursor is currently managed in buffer.ts and doesn't seem too bad atm. |
Currently our cursor handling is scattered over several classes:
Buffer
InputHandler
if (buffer.x >= terminal.cols)
Proposal:
Lets unify the cursor handling with an explicit class holding the position and doing proper range checks during re-positioning.
Stub:
For
set
andmove
the class can automatically enforce to stay within cols/rows limits. These limits could auto-update by terminal resize and such.The text was updated successfully, but these errors were encountered: