1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 06:12:16 +03:00
Commit Graph

49 Commits

Author SHA1 Message Date
Wez Furlong
86e59293d3 move renderer state into the Terminal instance
This simplifies usage and the Terminal trait
2018-07-21 13:19:38 -07:00
Wez Furlong
db787fdfd0 improve fidelity of tcsetattr interface 2018-07-21 11:18:24 -07:00
Wez Furlong
dfaf61ff6a add drain/purge ops, and tidy up Write::flush 2018-07-21 10:59:41 -07:00
Wez Furlong
c96800a2d4 extract unix tty functions to a trait
This also splits up the Handle type; we now just track the read
and write instances separately.
2018-07-21 10:30:15 -07:00
Wez Furlong
82bcccd640 add basic windows console renderer 2018-07-21 08:54:38 -07:00
Wez Furlong
f9fa2733fd expose windows terminal control handles via Terminal trait 2018-07-21 05:12:56 -07:00
Wez Furlong
0220e6872f split terminal into unix and windows modules 2018-07-21 04:39:56 -07:00
Wez Furlong
59d1a58297 sketch out a NOP windows renderer 2018-07-21 04:26:27 -07:00
Wez Furlong
7d83833e8c Now with something approximating windows support
I've run hello.rs under wine, but even though wine seems
to happily report that the windows 10 escapes are handled,
they are not.   So more work is needed.
2018-07-20 20:39:16 -07:00
Wez Furlong
439c0eba59 shrink some more enums 2018-07-20 13:10:46 -07:00
Wez Furlong
d8cf6181a1 make CSI a bit smaller by boxing Unspecified out of the enum 2018-07-20 12:41:39 -07:00
Wez Furlong
df7ab5f017 Add a little write buffer to UnixTerminal
This is important to reduce the the volume of write syscalls generated
during formatting of escape sequences.
2018-07-20 09:56:18 -07:00
Wez Furlong
6dbd5275e8 move Read/Write to the underlying Handle for UnixTerminal 2018-07-20 09:39:45 -07:00
Wez Furlong
232c3ec754 replace EncodeEscape trait with plain old Display
This makes it easier to use the escape sequence rendering with
plain old `format!`
2018-07-20 09:11:44 -07:00
Wez Furlong
5ac675bb5b simplify the terminfo renderer code a little by reducing macro usage 2018-07-20 07:18:18 -07:00
Wez Furlong
4090417b29 tidy up true color fallback handling 2018-07-20 06:59:32 -07:00
Wez Furlong
9c1fad733d doc updates 2018-07-20 06:59:32 -07:00
Wez Furlong
7111f5f153 remove test_ prefix from tests 2018-07-19 20:55:09 -07:00
Wez Furlong
d37eb906b3 Add a simple optimization to use ClearScreen 2018-07-19 18:48:59 -07:00
Wez Furlong
fe32fac524 Add ClearScreen Action
For clearing to a given background color, in some cases we may need
to know the size of the screen.  To facilitate this, I've changed
the interface for the renderer to receive the Terminal instance
so that we can query the size of the screen.
2018-07-19 18:01:13 -07:00
Wez Furlong
c78d8a0ccc add get/set terminal size 2018-07-19 11:26:24 -07:00
Wez Furlong
01f57141e5 Add UnixTerminal and the Terminal and IsTty traits 2018-07-19 10:52:29 -07:00
Wez Furlong
71354f8cb9 flesh out example and a couple of bugs 2018-07-19 09:58:48 -04:00
Wez Furlong
760be03f8e add failing example 2018-07-17 19:04:23 -07:00
Wez Furlong
b69cc04266 add non-terminfo fallback rendering 2018-07-17 14:30:03 -07:00
Wez Furlong
3a31975f06 Add terminal capabilities struct 2018-07-17 12:00:22 -07:00
Wez Furlong
eb7783242e add_changes() to improve efficiency of copy/draw operations 2018-07-16 09:30:44 -07:00
Wez Furlong
60912a4d44 add copy_region method 2018-07-16 08:30:27 -07:00
Wez Furlong
2830da269e Implement screen/region diffing and copying 2018-07-16 08:19:29 -07:00
Wez Furlong
30a549bdab avoid emitting sgr if the attribute bits are unchanged 2018-07-15 20:42:27 -07:00
Wez Furlong
0828e40b15 adopt encode_escape in the renderer
This pulls in the rendering code from the escape sequence parser
module and expands its tests.

Added my compiled xterm terminfo file to make sure that the
test environment is reproducible.
2018-07-15 20:36:51 -07:00
Wez Furlong
bb96508634 add support for DECSET and a handful of known modes 2018-07-15 15:08:09 -07:00
Wez Furlong
a96e4f29ba Add parsing/encoding for Esc sequences (non-CSI, non-OSC) 2018-07-15 14:17:22 -07:00
Wez Furlong
f692a6809a Add some OSC parsing/encoding 2018-07-15 11:13:43 -07:00
Wez Furlong
4fae1ea3af simplify CSI parsing 2018-07-15 08:59:57 -07:00
Wez Furlong
0637c73f1d improve compat/utility when converting params to 1-based values 2018-07-15 07:11:56 -07:00
Wez Furlong
6ba8de63f2 add some edit related CSI sequences 2018-07-14 23:39:17 -07:00
Wez Furlong
39875b8948 Add cursor codes 2018-07-14 22:12:06 -07:00
Wez Furlong
f585b40ea0 Add a way to (re-)encode parsed data as escape sequences 2018-07-14 18:16:12 -07:00
Wez Furlong
60b19aa6b4 add plumbing for escape sequence parsing 2018-07-14 16:27:42 -07:00
Wez Furlong
ca7c22ce74 End end relative positioning, untested for now 2018-07-14 08:10:56 -07:00
Wez Furlong
666af3ff3e sketch out the interface for two future functions 2018-07-14 08:00:50 -07:00
Wez Furlong
c63d17b1cc interpret CRLF in Text Change entries 2018-07-13 21:15:52 -07:00
Wez Furlong
a9bb29dde1 Initial work on the render concept 2018-07-13 20:58:53 -07:00
Wez Furlong
e11156abaa Ensure that the cursor pos is well defined after resize 2018-07-12 21:14:49 -07:00
Wez Furlong
1361c2ce61 invalidate Change stream on resize 2018-07-12 20:42:27 -07:00
Wez Furlong
c2acc333b1 add ability to flush the change stream 2018-07-12 20:07:47 -07:00
Wez Furlong
d889168001 construct Change streams 2018-07-12 09:05:46 -07:00
Wez Furlong
e547f8c504 start building out the terminal model
This is influenced by my code in wezterm
2018-07-12 07:26:37 -07:00