~ghost08/tcell-term

csi: use osc 1 and 2 instead of L and l for title

Functions the same, and some terminals don't support L and l for osc
control sequences

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
cursor: reorder cursor shapes to match tcell

CursorStyleDefault and CursorStyleBlinkingBlock were reversed in the
iota order as compared to tcell. Fix the order to match tcell.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
fix: remove log call on unknown ansi code

If this happens during a tcell application, it can garble the screen.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
title: send tcell event on title change

Send a tcell event when the title of the terminal changes

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
option: add option to set poll rate

Add option to set poll rate of EventWidgetContent events

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
run: allow running with custom SysProcAttr

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
example: replace main example and remove _simple

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
chore: gofumpt

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
view: remove unused screen calls and prevent panics

Prevent panics when calling references to view when it is nil.

Also, remove logging in csi handler

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
perf: only redraw cell if dirty

Use cell.Dirty to decide if redrawing cell or leaving as is.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
chore: remove unused code

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
csi: use cell.setStyle instead of assigning directly

This permits easier setting of cell.dirty

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
scrollable: fix delete and insert lines operations

Delete lines and insert lines in a scrollable region has the same effect
as scrolling up or down. Simplify the logic by calling these directly.
See [0] for a reference implementation.

[0]: https://github.com/james4k/terminal/blob/b4bcb6ee7c08ae4930eecdeb1ba90073c5f40d71/state.go#L682

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
terminal: BREAKING: use a redraw poll instead of channel

The processing of runes creates a very large amount of data sent to the
redrawRequest channel. Use a bool and periodic check for if a render is
required.

Previously, a debounce had been added. The debounce functioned similarly
to this implementation however there are fewer chances for error in this
implementation.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
terminal: don't require view and screen at New

Reverts a previous commit

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
cells: set dirty when cell changes

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
cell: add dirty methods and prop

To enable preventing drawing every cell, even if it hasn't changed

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
chore: remove old comment

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
example_simple: fix

Fix example_simple with latest updates

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
api: internalize redraw chan

Internalize redraw chan and use it to post an event to the tcell screen.
A new redraw request will issue a RedrawEvent to the screen.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Next