1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00
wezterm/termwiz/examples
Wez Furlong 79007d9c33 termwiz: line editor: allow custom editor actions
This restructures the LineEditor to allow the hosting application to
override key presses and apply custom edits to the editor buffer.

Methods for performing predefined actions and for accessing the line
buffer and cursor position have been provided/exposed to support this.

One consequence of this change is that the editor instance needs to be
passed through to the host trait impl and that means that the LineEditor
can no longer be generic over `Terminal`.  Instead we now take `&mut dyn
Terminal` which was how the majority of non-example code was using it in
any case.  This simplifies a bit of boilerplate in wezterm but adds an
extra line to the most basic examples.
2020-04-09 07:37:23 -07:00
..
buffered_terminal.rs failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
hello.rs failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
key_tester.rs failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
line_editor.rs termwiz: line editor: allow custom editor actions 2020-04-09 07:37:23 -07:00
terminal_direct.rs failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
widgets_basic.rs prep termwiz for a new release 2020-01-09 21:52:47 -08:00