Added support for tcell.Screen.SetCursorStyle#114
Conversation
Co-authored-by: Mark Kopenga <mkopenga@gmail.com>
Co-authored-by: Mark Kopenga <mkopenga@gmail.com>
dankox
left a comment
There was a problem hiding this comment.
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.
Actually this needs to be updated to 2.5.
dankox
left a comment
There was a problem hiding this comment.
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
CursorStylefield toViewthat people can set and we then update the cursor style depending on which view is the current view?