Skip to content

v0.12.4

Choose a tag to compare

@github-actions github-actions released this 02 Nov 03:37
· 15 commits to main since this release

Rune v0.12.4 rewraps output already on screen when the window is resized or a sidebar is shown or hidden, names keys the same way with numpad mode on or off, and keeps word editing keys responsive while held down.

Changed

  • Output rewraps to fit. Resizing the terminal or toggling a side pane used to cut off existing output at the new edge, while only new lines wrapped at the new width. Rune now stores scrollback as whole lines and wraps them to the current width when drawing, so all output rewraps, and unwraps again when there is room.
  • Scrolled position survives a resize. While scrolled back, the same text stays at the bottom of the output pane after a resize or layout change.
  • Search finds text across wrapped rows. A phrase that wraps onto a second row now matches. Selecting a match centers the row that contains it, and the match list scrolls a long line so the match is visible.
  • Key names no longer depend on numpad mode. A key that types a character is bound by that character. On a Norwegian keyboard in Windows Terminal 1.25, Shift and the key left of 1 is § with numpad mode on or off; it used to be shift+| with numpad mode on. The same applies to shifted symbols on any layout (!, ?), AltGr characters, and dead-key letters such as ë.
  • Word editing keys run inside the input line. Ctrl+W, Alt+Backspace, and Alt/Ctrl with the arrow keys edit the input directly instead of going through Lua, so they keep up when held down, even during heavy output. They are bound to the new input.delete_word, input.word_left, and input.word_right actions and can be rebound like any other key.

Script Compatibility

  • Binds written as shift+ and a symbol, such as shift+| or shift+1, no longer fire. Bind the symbol instead: §, !.
  • A capital letter outside A to Z, such as Ø or Ä, is named shift+ø or shift+ä, matching shift+a. With numpad mode on, Caps Lock letters are now shift+a instead of a, and Shift+Space is space.
  • An input action is matched only by its key's name. A numpad key still falls back to its ordinary key, so keypad Enter submits.
  • input_changed hooks no longer see typing that a script edit replaced before it reached the screen.
  • rune.state.scroll_lines counts lines received while scrolled, not wrapped rows, so a long line counts once and the count no longer changes on resize.
  • Search results are whole lines instead of screen rows. A line with several matches is one result, with every match highlighted.

Fixed

  • A script edit to the input line, such as a custom delete-word bind, is no longer undone when the key is held down.
  • A wrapped row drawn at the top of the output pane or a named pane keeps its color instead of appearing unstyled.

Known Issues

  • Lines the server breaks itself, such as text wrapped at 80 columns before it is sent, stay broken when the window is wider.
  • Maps, tables, and other preformatted text wrap when the output pane is narrower than they are. Widening the pane restores them.
  • On terminals that send Alt as an escape prefix, including Windows Terminal before 1.25, holding an Alt key such as Alt+Backspace does nothing until it is released. This is a bug in the terminal input library Rune uses, reported as charmbracelet/ultraviolet#219. Windows Terminal 1.25 and later send these keys in a form that should avoid it.
  • Alt with a shifted symbol is named differently by older terminals (alt+§) and terminals using the kitty keyboard protocol (alt+shift+|).

Full changes since v0.12.3