Commit Graph
27 Commits
Author SHA1 Message Date
Jun Wu 318267c88b Fix negative cursor movement
I noticed moving-up does not work and tracked it down here.
2020-01-05 14:18:08 -08:00
Jeremy Fitzhardinge 887991f464 Remove BlockOutline cursor style
Not really needed, since its something we can handle at rendering time.
2019-12-29 16:58:15 -08:00
Jeremy Fitzhardinge 6d5fbf93ff Define outline cursor for unfocused use 2019-12-29 16:58:15 -08:00
Wez Furlong 4fdee2baf0 maybe fix the windows build for anyhow changes 2019-12-14 22:27:37 -08:00
Wez Furlong 9a2c7a1485 failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
Wez Furlong b58d329b07 some plumbing to use Surface+Change for the mux protocol 2019-06-16 21:04:53 -07:00
Wez Furlong 5ccff722ef more log 2019-06-08 15:37:55 -07:00
Mark Thomas 70741d4f80 set underline and blink in fallback path
pull/29 inadvertently removed the fallback path for setting single
underline and slow blink.  Restore it.
2019-06-02 13:55:07 -07:00
Mark Thomas 3f16979067 clean up flush_pending_attr
The `flush_pending_attr` method does lots of unnecessary comparisons.
If the attributes have changed, then it works by resetting the
attributes and then setting new values.  There's no need to emit the
codes for exiting modes.

It also doesn't support double underscore or rapid blink in the cases
where the terminfo capabilities are used, as these capabilities can't
express these attributes.  Fall back to CSI sequences when these
attributes are requested.
2019-06-02 12:41:46 -07:00
Mark Thomas 90689d4406 set colors after resetting attributes
Changing the terminal attributes (bold, underline, etc.) involves
emitting the `exit_attribute_mode` or SGR reset sequence.  This also
resets the colors back to their defaults.  If this happens when the
foreground or background colors haven't changed, set the colors again.
2019-06-02 12:41:46 -07:00
Wez Furlong cd027430db fixup tests 2019-05-26 22:58:38 -07:00
Wez Furlong 4fe790dd0c add cursor movement, deletion 2019-05-26 22:04:47 -07:00
Wez Furlong 6d243ec1f1 termwiz: add very basic line editor 2019-05-26 21:10:37 -07:00
Wez Furlong 038100922a clippy 2019-05-26 12:49:10 -07:00
Wez Furlong f87901c484 tidy up some failure usage 2019-05-26 08:58:59 -07:00
Mark Thomas 5d8860f3dd add terminal wakers
Terminal wakers allow other threads to wake the main terminal processing thread.
2019-05-18 09:12:47 -07:00
Mark Thomas 4ca7214ae2 optimize change to column 0 as CR
Optimize a `Change::CursorPosition { x: Absolute(0), y: Relative(0) }` as CR.
2019-05-18 09:12:47 -07:00
Mark Thomas 6164860a10 add alternate screen support
Add new methods to the `Terminal` trait for entering and exiting the alternate
screen.
2019-05-18 09:12:46 -07:00
Mark Thomas 7c6cf297a6 add scrolling of regions
Add two new `Change` variants: `ScrollRegionUp` and `ScrollRegionDown`, which
scroll part of the screen up or down by a number of lines.

On Unix, these are implemented using the `change_scroll_region` and
`parm_index`/`parm_rindex` terminfo capabilities if available.  If `parm_index`
or `parm_rindex` are not available, but `scroll_forward` or `scroll_reverse`
are, then these are used repeatedly to get the same effect.

On Windows, these are implemented using `ScrollConsoleScreenBuffer`.
2019-05-18 09:12:46 -07:00
Mark Thomas 4e783b3920 make cursor visible when setting shape to default
If the cursor has been made invisible (by setting the shape to `Hidden`),
then in order for it to be visible when it is reset to the default shape,
it must be made visible.  This can be done by rendering the `CursorVisible`
sequence.

Where supported, the `CursorNormal` sequence can be rendered to do
both `CursorVisible` and `ResetCursorStyle` in one go.
2019-05-18 09:12:46 -07:00
Wez Furlong 222e278720 adopt OneBased type for a number of row/col escape sequences 2019-03-22 20:41:50 -07:00
Wez Furlong dba88d2102 clippy 2019-02-24 12:01:08 -08:00
Wez Furlong 7e38628486 update termwiz to 2018 edition 2019-02-18 23:26:41 -08:00
Wez Furlong 2db17562a6 rustfmt 2019-02-16 00:08:38 -08:00
Wez Furlong 61fec42216 cargo fmt with current stable rustfmt 2018-09-19 20:06:31 -07:00
Wez Furlong a267ebb576 add theoretical support for storing Images in the Surface
There's basic rendering also, but it is not complete.
Needs more tests; will come back to those once more scaffolding
is in place.
2018-08-08 07:07:31 -07:00
Wez Furlong 376da31ee4 restructure termwiz tree prior to merging into wezterm repo 2018-08-05 07:55:30 -07:00