Commit graph

15 commits

Author SHA1 Message Date
Ayman Bagabas
d1ec9826ad chore(tests): update testdata 2026-04-13 10:29:11 -04:00
Ayman Bagabas
ac355fe194
fix(renderer): restore tab stops if hard tabs are enabled (#1677)
When hard tabs are enabled, we optimize rendering by using actual tab
characters instead of spaces. This requires us to set tab stops every 8
columns at the beginning of the rendering process.

Fixes: https://github.com/charmbracelet/bubbletea/issues/1614
2026-04-13 10:28:52 -04:00
Ayman Bagabas
742b944f78
feat(render): enable Unicode mode (2027) for accurate width calculation (#1584)
When the terminal supports it, we now enable Unicode mode (ANSI mode
2027) to ensure accurate width calculation for wide characters and
emojis. This improves rendering fidelity in terminals that support this
mode.
2026-02-13 15:36:47 +03:00
Ayman Bagabas
6595041da2
fix(renderer): no need to enable both modifyOtherKeys protocols 2026-02-10 15:14:14 +03:00
Ayman Bagabas
9155c16141
chore: update testdata to reflect modifyOtherKeys mode 1 and 2 changes 2026-02-09 10:45:27 +03:00
Erik St. Martin
724479d6d5
feat(renderer): add modifyOtherKeys support (#1579)
Modified keys (shift+enter, ctrl+i, etc.) don't work in tmux because
tmux doesn't support the Kitty keyboard protocol. tmux requires
applications to request extended-keys using modifyOtherKeys (CSI > 4 ; 2 m).

The workaround is setting 'extended-keys always' in tmux config (tmux 3.2+),
but users may not know this is the issue, and forcing extended-keys for all
applications may not be desired. This fix sends modifyOtherKeys requests
alongside Kitty protocol sequences, enabling proper key handling in tmux
automatically.
2026-02-09 09:56:52 +03:00
Ayman Bagabas
59807cf07c
fix(renderer): reset kitty keyboard protocol on alt screen switch (#1554)
* fix(renderer): reset kitty keyboard protocol on alt screen switch

We need to reset the kitty keyboard protocol when switching between main
and alt screens. This is because kitty maintains separate keyboard
protocol registries for each screen, and failing to reset the protocol
can lead to issues such as the inability to use the Ctrl key in some
editor that don't support kitty's keyboard protocol.

* chore: update golden files to match the renderer output
2025-12-10 15:37:12 -05:00
Ayman Bagabas
6483c7e3ae
chore(tests): update golden files 2025-11-16 14:55:49 -05:00
Ayman Bagabas
fa796c98c0
chore: update testdata for cursor hide/show changes 2025-11-14 10:32:36 -05:00
Ayman Bagabas
a74936a850
chore(tests): fix tests and update testdata 2025-11-13 14:46:50 -05:00
Ayman Bagabas
4accb1c4d5 fix: renderer: avoid requesting keyboard enhancements on close
When the renderer is being closed, we should avoid requesting kitty
keyboard enhancements so that we don't leave the terminal with unhandled
input sequences.
2025-10-30 14:37:41 -04:00
Ayman Bagabas
72ca5f4e6b
chore: update golden files
Related: fa36fb177e
Related: d7c95b8a27
2025-10-30 12:47:01 -04:00
Ayman Bagabas
bd747e7bfa
refactor: clean up redundant code and update testdata 2025-10-01 13:50:38 -04:00
Ayman Bagabas
0ee1cf13c9
refactor: move key enhancement logic and options to View struct 2025-10-01 13:50:38 -04:00
Ayman Bagabas
fb3e0a4a3e
refactor: lean more into the View struct to manage terminal state 2025-10-01 13:50:37 -04:00