-
Notifications
You must be signed in to change notification settings - Fork 39
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
Added support for tcell.Screen.SetCursorStyle #114
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Mark Kopenga <[email protected]>
Co-authored-by: Mark Kopenga <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Nice feature.
Sorry for such late response on this one.
github.com/gdamore/tcell/v2 v2.4.0 | ||
github.com/mattn/go-runewidth v0.0.10 | ||
golang.org/x/text v0.3.3 // indirect | ||
github.com/gdamore/tcell/v2 v2.4.1-0.20211227212015-3260e4ac4385 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this needs to be updated to 2.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I didn't realize that the version doesn't match, so it needs to be updated.
Other than that, I like the design. There is not much to do to be honest. You set the style of cursor and that's it :) At least that's how I see it. The function makes sense.
I like the function more, because that way you can change the style of cursor on fly and reflect specific ways of editing for example. If it would be set as a field it would feel a bit "permanent". However, you have a point, that maybe it could be also per |
This draft adds very basic support for the new SetCursorStyle feature of tcell (not yet released as far as I can see).
We probably want to be more declarative about this though.
@mjarkk @dankox any suggestions on how to make this nicer?
Perhaps it makes sense to add a
CursorStyle
field toView
that people can set and we then update the cursor style depending on which view is the current view?