OpenTUI 0.5.7
Added
- core: Double-click selects a word and triple-click selects a line. A second press on the same cell within 500 ms selects a word, and a third selects a line. A single click still selects nothing. Dragging after a word click keeps the spaces between words. Shift+arrow after a multi-click extends by cell.
ASCIIFontand tables stay cell-only. The click interval and word-character set are fixed.SelectionBehavior("cell" | "word" | "line") is accepted as an optionalbehaviorargument byCliRenderer.startSelection(),RenderContext.startSelection, theSelectionconstructor,TextBufferView.setLocalSelection(),TextBufferView.updateLocalSelection(),EditorView.setLocalSelection()andEditorView.updateLocalSelection().Selection.behaviorandLocalSelectionBounds.behaviorexpose it. See Interaction, focus, and selection. (#1407) - core: Selection occupancy is configurable with
SelectionOccupancy("cell" | "boundary")."cell"includes both endpoint graphemes, as in Vim."boundary"selects a half-open range between insertion points, as with a thin cursor. Set it with theselectionOccupancyoption onEditBufferOptionsandEditBufferRenderable. Read and write it withTextBufferView.getSelectionOccupancy(),TextBufferView.setSelectionOccupancy(),EditorView.getSelectionOccupancy()andEditorView.setSelectionOccupancy().EditorViewalso addsconvertSelectionToCell(),gotoVisualLineEnd(),setSelectionColors()andsetSelectionInclusive(). See Textarea and Interaction, focus, and selection. (#1393)
Changed
- core: Selection endpoints are normalized to whole graphemes. Highlighting, copied text, deletion, cursor sync and wrapped-line navigation now agree in both directions. Extending a selection by one display column no longer splits a wide grapheme. A press without movement keeps the selection empty. A cursor at the end of a line does not select the newline, but crossing the line boundary does. See Interaction, focus, and selection. (#1393)
Fixed
- core: A selection no longer flips when
xis left of the text andyis below it. See Interaction, focus, and selection. (#1381) - core: Forced Sixel output is rejected unless the detected host supports Sixel. Apple Terminal and terminal multiplexers now fall back to blocks. See Terminal capabilities. (#1387)
- core: OSC 66 probe responses are matched to their requests. See Terminal capabilities. (#1384)
- core: Split-footer commits on Darwin ARM64 no longer lose frame-finalization state. Native boolean flags are passed as numeric bytes, so Bun and Node share one FFI contract. Cell attributes are tested as
u32on all platforms under Node. See Runtime and platform support. (#1409, #1411) - core: Node.js releases later than 26.4.0 are supported. 26.4.0 remains the minimum. See Runtime and platform support. (#1410)
API changes#
@opentui/core#
Added
method EditorView.convertSelectionToCell(): booleanmethod EditorView.getSelectionOccupancy(): SelectionOccupancymethod EditorView.gotoVisualLineEnd(): voidmethod EditorView.setSelectionColors(bgColor?: RGBA, fgColor?: RGBA): voidmethod EditorView.setSelectionInclusive(start: number, end: number, bgColor?: RGBA, fgColor?: RGBA): voidmethod EditorView.setSelectionOccupancy(occupancy: SelectionOccupancy): voidmethod TextBufferView.getSelectionOccupancy(): SelectionOccupancymethod TextBufferView.setSelectionOccupancy(occupancy: SelectionOccupancy): voidproperty EditBufferOptions.selectionOccupancy?: SelectionOccupancyproperty EditBufferRenderable.selectionOccupancy: SelectionOccupancyproperty LocalSelectionBounds.behavior: SelectionBehaviorproperty RenderLib.editorViewConvertSelectionToCell: (view: EditorViewHandle) => booleanproperty RenderLib.editorViewGotoVisualLineEnd: (view: EditorViewHandle) => voidproperty RenderLib.editorViewSetSelectionColors: (view: EditorViewHandle, bgColor: RGBA | null, fgColor: RGBA | null) => voidproperty RenderLib.editorViewSetSelectionInclusive: (view: EditorViewHandle, start: number, end: number, bgColor: RGBA | null, fgColor: RGBA | null) => voidproperty RenderLib.editorViewSetSelectionOccupancy: (view: EditorViewHandle, occupancy: SelectionOccupancy) => voidproperty RenderLib.textBufferViewGetSelectionOccupancy: (view: TextBufferViewHandle) => SelectionOccupancyproperty RenderLib.textBufferViewSetSelectionOccupancy: (view: TextBufferViewHandle, occupancy: SelectionOccupancy) => voidproperty Selection.behavior: SelectionBehaviortype SelectionBehavior = "cell" | "word" | "line"type SelectionOccupancy = "cell" | "boundary"
Changed
constructor Selection(anchorRenderable: Renderable, anchor: { x: number; y: number; }, focus: { x: number; y: number; })constructor Selection(anchorRenderable: Renderable, anchor: { x: number; y: number; }, focus: { x: number; y: number; }, behavior?: SelectionBehavior)method CliRenderer.startSelection(renderable: Renderable, x: number, y: number): voidmethod CliRenderer.startSelection(renderable: Renderable, x: number, y: number, behavior?: SelectionBehavior): voidmethod EditorView.setLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean): booleanmethod EditorView.setLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean, behavior?: SelectionBehavior): booleanmethod EditorView.updateLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean): booleanmethod EditorView.updateLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, updateCursor?: boolean, followCursor?: boolean, behavior?: SelectionBehavior): booleanmethod TextBufferView.setLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA): booleanmethod TextBufferView.setLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, behavior?: SelectionBehavior): booleanmethod TextBufferView.updateLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA): booleanmethod TextBufferView.updateLocalSelection(anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor?: RGBA, fgColor?: RGBA, behavior?: SelectionBehavior): booleanproperty RenderContext.startSelection: (renderable: Renderable, x: number, y: number) => voidproperty RenderContext.startSelection: (renderable: Renderable, x: number, y: number, behavior?: SelectionBehavior) => voidproperty RenderLib.editorViewSetLocalSelection: (view: EditorViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, updateCursor: boolean, followCursor: boolean) => booleanproperty RenderLib.editorViewSetLocalSelection: (view: EditorViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, updateCursor: boolean, followCursor: boolean, behavior?: SelectionBehavior) => booleanproperty RenderLib.editorViewUpdateLocalSelection: (view: EditorViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, updateCursor: boolean, followCursor: boolean) => booleanproperty RenderLib.editorViewUpdateLocalSelection: (view: EditorViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, updateCursor: boolean, followCursor: boolean, behavior?: SelectionBehavior) => booleanproperty RenderLib.textBufferViewSetLocalSelection: (view: TextBufferViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null) => booleanproperty RenderLib.textBufferViewSetLocalSelection: (view: TextBufferViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, behavior?: SelectionBehavior) => booleanproperty RenderLib.textBufferViewUpdateLocalSelection: (view: TextBufferViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null) => booleanproperty RenderLib.textBufferViewUpdateLocalSelection: (view: TextBufferViewHandle, anchorX: number, anchorY: number, focusX: number, focusY: number, bgColor: RGBA | null, fgColor: RGBA | null, behavior?: SelectionBehavior) => boolean