Skip to content

v2.2.2

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 11:45
v2.2.2
0c1a491

A big squash 🫧

A patch release with a whole lot of patches! Over 40 fixes across nearly every component, most of them from the community. Text inputs handle wide characters better, viewports respect their borders, and timers keep honest time.

Text Input

  • The cursor stays in the right place with wide characters and when the value is scrolled.
  • Shows the full placeholder when no width is set.
  • Suggestions refresh when you set the value, and completions stay within the input's width.
  • No more out-of-range suggestion index.
  • Deleting the next word stops at the end of that word.
  • The virtual cursor now uses your TextStyle.
  • Shift+Backspace deletes, too, for terminals using the kitty keyboard protocol.
  • Clipboard errors wrap the original error, so errors.Is works.

Text Area

  • Moves and deletes by whole characters, so emoji and other combined characters stay intact.
  • CharLimit counts characters, not screen width, so a CJK character no longer counts double.
  • A word that exactly fills a line stays on it.
  • The cursor can reach wrapped lines at the end of the text.
  • The view follows the cursor after SetValue.
  • Autoresize keeps the first wrapped line visible.
  • The first inserted line is counted once when measuring height.
  • Always keeps at least one column for text, even when MaxWidth is tiny.
  • The placeholder no longer renders twice.
  • Shift+Backspace and clipboard error fixes, same as Text Input.

Viewport

  • Pages by the height you can actually see when the style has a border or padding.
  • ScrollPercent accounts for borders and padding.
  • Highlights line up on content that's already styled.

Table

  • SetCursor scrolls to keep the selected row visible.
  • The view stays put when you step past the last row.
  • SetRows with no rows resets the cursor to the top.
  • Extra cells in a row are ignored instead of breaking the layout.

List

  • q and esc are back as the default quit keys.
  • Titles without a status message are no longer cut off.
  • Fuzzy matches highlight the right characters with non-English text.
  • Removing an item while filtering keeps the filtered list in sync.

Timer ⏱️

  • Calling Start more than once no longer makes the timer count down faster.
  • Leftover ticks from an earlier start are now really ignored.

Stopwatch

  • Elapsed time follows the actual clock, so slow updates can't make it fall behind.
  • New() defaults to a one-second interval, just like the docs always said.

Progress

  • Percentages out of range are clamped before animating and rendering.
  • Fixed a race in the animation.

File Picker

  • The selection stays valid while entries load.
  • No more stray extra newline.

Help

  • Short help stays within its width.
  • Full help columns are styled properly, padding included.

Tree

  • SetValue updates what's rendered.
  • SetNodes accepts a nil root.

Paginator

  • An invalid page size leaves pagination as it was instead of breaking it.

Big thanks to everyone who contributed, and an extra big welcome to the huge crowd of first-time contributors! This release is mostly yours 🫶

Read the details below 👇🏻

Have a less buggy weekend,
Charm XX 🌊

Changelog

Fixed

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.