Skip to content

Conversation

@joelim-work
Copy link
Collaborator

@joelim-work joelim-work commented Dec 2, 2025

Changes:

  • Use the new v3 of Tcell (from v2).
  • Support for SGR 8 (concealed text) is removed as Tcell has dropped support for it. This is a breaking change, however it is a very niche feature and I don't think users are interested in it anyway.
  • Map <backspace2> keybindings to <backspace>, since Tcell does this internally. This is a breaking change, however it should be a welcome one as it unifies <backspace> and <backspace2>, which reduces confusion.
  • ui.keyAcc and ui.keyCount are changed from []rune to string, since key events in Tcell now store a string instead of a rune. This makes the code easier to work with.
  • Utility functions are added for converting between Tcell key events and their string representations (e.g. <space>/<c-a>).
  • The key event handling code has largely been rewritten to make the logic clearer.
  • Replace SetContent calls with PutStrStyled, this requires rewriting the win.print function to accommodate for the new API.

Anyway I will plan to leave this PR open for a while, and only merge it when it (and the new version of Tcell) becomes more stable.

Warning

Apparently keybindings for capital letters (e.g. G for bottom) don't work in v3 of Tcell. at least for me. I have raised an issue about it.
Fixed now, but I still plan to leave this PR open for a while regardless, not in a rush to merge.

@joelim-work joelim-work added this to the r40 milestone Dec 2, 2025
@joelim-work joelim-work added the breaking Pull requests that introduce breaking changes label Dec 2, 2025
@CatsDeservePets
Copy link
Collaborator

Uppercase letters get reported incorrectly for me as well.
I haven't encountered any other bug so far.

On a side note: I've noticed you've been using conventional commits more often lately. I try to align my commit messages to match the repos style. If you plan to stick with them going forward, I will use them as well.

@gdamore
Copy link

gdamore commented Dec 2, 2025

I fixed the upper case keys issue. Sorry about that!

@joelim-work
Copy link
Collaborator Author

On a side note: I've noticed you've been using conventional commits more often lately. I try to align my commit messages to match the repos style. If you plan to stick with them going forward, I will use them as well.

Yes, it's something I have decided to adopt from now on, since many other projects are using it too. I am uncertain about actually enforcing it though (e.g. via CI), or using it as a replacement for the existing breaking/new/fix labels. Just having some visual structure to the commit history is enough for me.

@CatsDeservePets
Copy link
Collaborator

CatsDeservePets commented Dec 3, 2025

On a side note: I've noticed you've been using conventional commits more often lately. I try to align my commit messages to match the repos style. If you plan to stick with them going forward, I will use them as well.

Yes, it's something I have decided to adopt from now on, since many other projects are using it too. I am uncertain about actually enforcing it though (e.g. via CI), or using it as a replacement for the existing breaking/new/fix labels. Just having some visual structure to the commit history is enough for me.

Cool, I am all for unification. I have been using them myself in privat projects (although I am using the Angular guidelines which famously dropped chore).

I guess using it for commit messages is good for now, we can always expand on that later.

@joelim-work joelim-work removed the breaking Pull requests that introduce breaking changes label Dec 10, 2025
@joelim-work joelim-work removed this from the r40 milestone Dec 10, 2025
@joelim-work joelim-work added the breaking Pull requests that introduce breaking changes label Dec 10, 2025
@joelim-work joelim-work changed the title chore!: Change to use v3 of Tcell chore!: change to use v3 of Tcell Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Pull requests that introduce breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrating to Tcell v3

3 participants