Commit Graph

65 Commits (master)

Author SHA1 Message Date
Florian Dehau 9806217a6a feat!: use crossterm as default backend 3 years ago
Florian Dehau 975c4165d0 chore: fix clippy warnings 3 years ago
Alexandru Scvortov d47565be5c
fix: actually clear buffer in TestBackend::clear (#461) 3 years ago
Joey Ezechiëls 3a843d5074
fix(test): remove compile warning in TestBackend::assert_buffer (#466) 3 years ago
Florian Dehau 853f3d9200 feat(terminal): add a read-only view of the terminal state after the draw call 3 years ago
Brooks Rady ce32d5537d
chore: clippy fixes (#386) 4 years ago
alvinhochun e0b2572eba
refactor(backend/crossterm): support more style modifiers on Windows and fix build with Crossterm 0.17.8 (#368)
* Support more style modifiers on Windows
* Change Crossterm backend to write directly to buffer instead of String

Crossterm might actually do WinAPI calls instead of writing ANSI excape
codes so writing to an intermediate String may cause issues on older
versions of Windows. It also fails to compile with Crossterm 0.17.8 due
to Crossterm now expecting the writer to support `flush`, which String
doesn't.

Fixes #373
4 years ago
Florian Dehau ecb482f297 fix(backend): move the cursor when first diff is on second cell
Both termion and crossterm backends were not moving the cursor if the first diff to draw was on the
second cell. The condition triggering the cursor move has been updated to fix this. In addition, two
tests have been added to avoid future regressions.
4 years ago
Florian Dehau 0ffea495b1 refactor: implement cascading styles
- merge `Style` and `StyleDiff` together. `Style` now is used to activate or deactivate certain
style rules not to overidden all of them.
- update all impacted widgets, examples and tests.
4 years ago
Florian Dehau 96c6b4efcb refactor(tests): move test utilities to TestBackend
* Remove custom Debug implementation of Buffer
* Add `TestBackend::assert_buffer` to compare buffers in integration tests. When
the assertion fails, the output now show the list of differences in addition
of the views of the computed and expected buffers. This effectively replaces
the table of debug code for colors and modifiers as it is easier to read.
4 years ago
Florian Dehau 3f62ce9c19 chore: remove unecessary dependencies
* Remove log, stderrlog, structopt
* Add argh
4 years ago
Florian Dehau d16db5ed90 style: fix clippy warnings 4 years ago
Timon 60b99cfc66 feat: bump crossterm to 0.14 4 years ago
Timon e4873e4da9 feat(backend): bump crossterm to 0.13
* removed flush calls because execute already calls flush under the hood.
* moved some static functions into From traits
* removed useless clone in demo
* upgrade to crossterm 0.13
* map all errors
5 years ago
Florian Dehau 3747ddbefb feat(backend): Refactor crossterm backend
* Remove compilation warnings
* Fix rendering artifacts in the crossterm demo. In particular, the bold modifier
was leaking on most of the terminal screen because the old logic was not
properly unsetting the bold modifier after use (took inspiration of the termion
backend implementation)
5 years ago
Joseph Knight 97357c0e08 typo in curses.rs 5 years ago
Timon_Post a0f6605f59 Implemented command api crossterm, for better perfomance. 5 years ago
Florian Dehau a3827aaeae Remove try call in termion backend 5 years ago
defiori 25a0825ae4 fix: curses backend cursor positions 5 years ago
scauligi b1ac297d71 fix crossterm terminal size and dark gray color 5 years ago
Timon_Post f6a0a91a23 fmt 5 years ago
timonpost@hotmail.nl ffaaf5e39c review update 5 years ago
timonpost@hotmail.nl 567cf7b8e5 update 0.9.2 5 years ago
Florian Dehau a74d335cb4 Fix clippy warnings 5 years ago
David Flemström 21e79ca078 Rebase and include necessary curses changes 5 years ago
David Flemström a25bbea555 Add workarounds for weird termion escape code handling 5 years ago
David Flemström b7664a4108 Support several modifiers and indexed colors at once 5 years ago
Florian Dehau e037db076c fix(backend/curses): use chtype to achieve platform agnostic conversion of graphemes 5 years ago
Florian Dehau 3ef19f41e6 fix(backend/curses): avoid platform specific conversion of graphemes 5 years ago
Florian Dehau da90ec15fa fix: add missing get_cursor and set_cursor on CursesBackend 5 years ago
Florian Dehau 7f5af46300 style: fmt 5 years ago
defiori 624e6ee047 fix: filter out wide unicode characters on windows 5 years ago
defiori 4a1f3cd61f feat: curses instance can be passed to backend 5 years ago
defiori d75198a8ee feat: add pancurses backend 5 years ago
defiori cadb41c9e3 fix: unified crossterm backend 5 years ago
defiori b30cae0473 feat: crossterm backend can use alternate screen 5 years ago
scauligi 7290086fe9 forgot to flush 5 years ago
scauligi bca920bea0 get/set cursor position 5 years ago
Jonathan cd41ca571f Modified with_crossterm naming scheme 5 years ago
Jonathan dc654e9f6c Added ability to create crossterm with previously created crossterm::Screen 5 years ago
Florian Dehau b669cf9ce7 style: fix clippy warnings 5 years ago
Florian Dehau 97f764b45d feat: handle crossterm errors 5 years ago
Florian Dehau 52a40ec99a fix: remove undefined crossterm attributes in windows builds 5 years ago
Sven-Hendrik Haase 144bfb71cf Upgrade to 2018 edition 5 years ago
Ash a2776dfc86 Make sure we always emit a cursor goto for the first update.
Otherwise, if the first update is to (1, 0) then no goto occurs.
6 years ago
Florian Dehau b3689eceb7 feat: update outdated dependencies 6 years ago
Karoline Pauls 5cee2afc6d Limit Rect size to prevent u16 overflow 6 years ago
Florian Dehau 22e8fade7e feat: add experimental test backend 6 years ago
Florian Dehau aa85e597d9 fix(crossterm): fix goto coordinates 6 years ago
Florian Dehau 5d52fd2486 refactor: remove custom termion backends 6 years ago