1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-22 04:41:34 +03:00
Commit Graph

1214 Commits

Author SHA1 Message Date
Wez Furlong
49467515d6 when erasing the display ensure line size matches physical
In the case where the screen was enlarged, we don't eagerly resize
the line vectors.

If a subsequent erase display occurred, we'd only erase to the old
size of the lines, rather than the new size, which could result
in a black square in the upper right corner of the display.

Repro scenario is:

* resize window larger than initial height
* `dialog --yesno hello 0 0`

The dialog background should fill the display.
2019-03-22 21:59:54 -07:00
Wez Furlong
cbc1462bb4 fix color of erased characters
This was responsible for eg: dialog rendering a black (or whatever
the default background color was) strip behind the text in an
invocation like:

`dialog --yesno hello 0 0`

Rather than render a default cell, render a blank cell using the
current pen.
2019-03-22 21:45:51 -07:00
Wez Furlong
54324121f2 implement basic DEC Line drawing mode
This improves the rendering of eg: `dialog`
2019-03-22 21:28:42 -07:00
Wez Furlong
5533eaeba2 disable coretext by default on macos
freetype renders better for now
2019-03-22 21:14:37 -07:00
Wez Furlong
7514010d09 make wezterm with no args behave like wezterm start 2019-03-22 21:12:21 -07:00
Wez Furlong
9fdc420faf use floats for metrics
The aim was to get to the bottom of why the coretext rendering seems
a bit off; the theory was that it was due to integer rounding somewhere,
but it seems that I still haven't gotten to the bottom of it here.
2019-03-22 20:41:50 -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
93020c7553 bump glutin sync channel size
This is a workaround; need to remove the sync restriction when
queuing up work from the gui thread as I occasionally deadlock
myself.
2019-03-22 20:41:50 -07:00
Wez Furlong
29c7610ead add OneBased helper 2019-03-22 20:41:50 -07:00
Wez Furlong
e68bf65b2f clean up some of the newer escape sequence processing 2019-03-22 20:41:50 -07:00
Wez Furlong
3003654cc8 fix apt upgrade scrolling issue
This was an off-by-one issue when using scroll margins just shorter
than the screen and when scrollback is enabled.

Added a unit test to verify the behavior.
2019-03-22 20:41:50 -07:00
Wez Furlong
27c4de367e update record/play scripts for macos 2019-03-22 20:41:50 -07:00
Wez Furlong
6cbb3ba432 impl IRM insert mode and improve esctest conformance
I've had mixed results with esctest; the IRM and cursor save/restore
tests fail for me in terminal.app, iterm2 and xterm, and fail in the
same way on wezterm, so I'm not sure if I'm not running those tests
correctly.  However, they did encourage the discovery of some other
real issues in the wezterm emulation.
2019-03-22 20:41:50 -07:00
Wez Furlong
6be7c74967 fix rendering of unspecified csi 2019-03-22 20:41:50 -07:00
Wez Furlong
9702d1cf5a Add plumbing for running esctest 2019-03-22 20:41:50 -07:00
Wez Furlong
ff64ba727b fix Executor names copypasta 2019-03-22 20:41:50 -07:00
Wez Furlong
1c06430b3a Add Null frontend; intended for testing purposes 2019-03-22 20:41:50 -07:00
Wez Furlong
c33bbc8f23 clamp scroll values rather than asserting
I've been looking at https://gitlab.freedesktop.org/terminal-wg/esctest/tree/master
to verify some behaviors and found that it would send out of range
values that would cause wezterm to panic.  Rather than panic, just
clamp.
2019-03-22 20:41:50 -07:00
Wez Furlong
bdfef1fd79 implement Window::ReportTextAreaSizeCells 2019-03-22 20:41:50 -07:00
Wez Furlong
fd2e5855a5 Implement CSI REP 2019-03-22 20:41:50 -07:00
Wez Furlong
2c32eb9337 recognize window management related CSI
These were showing up as unrecognized sequences on my mac, and I
wondered what they were.  We now parse them and do nothing with
them, other than print out the parsed form :)
2019-03-22 20:41:50 -07:00
Wez Furlong
cdd0735357 quell warning 2019-03-22 20:41:50 -07:00
Wez Furlong
46cd26a421 de-dup shader sources
They only vary by version, so simplify this a bit
2019-03-22 20:41:50 -07:00
Wez Furlong
1a883a40e9 use vte with larger OSC buffer support
I wanted to see how much work remains to enable iterm2 image
display; one of the blockers was a limit in the size of the
buffer in the vte crate, which has been removed in my fork
of vte.

As part of testing our ability to absorb that data, I found
a couple of issues with applying the image cells to the display,
so this commit also takes care of that.

We still don't have code to connect the cell image data to the
opengl render layer.
2019-03-22 20:41:50 -07:00
Wez Furlong
a4a078cf98 Employ zstd compression for large pdus
This cuts down the coarse data from ~13k to ~200 bytes
2019-03-22 20:41:50 -07:00
Wez Furlong
2077e3fd21 use varbincode for mux protocol; results in ~3x smaller packets
Reduces the size of the full screen serialized size from 40k -> 13k.

Note that the `zlo` crate (which doesn't appear to have a repo
on github any longer; sources are only found in the crates.io
documentation source view), employes zigzag encoding of all integers
and floating point values and takes the size down to just under 10k.

A todo is to follow up on that and see if we could adopt the same
scheme in varbincode.
2019-03-22 20:41:50 -07:00
Wez Furlong
322f7c74e6 add varbincode 2019-03-22 20:41:50 -07:00
Wez Furlong
217ad94c80 fixup tests for Rc<Hyperlink> -> Arc<Hyperlink> change 2019-03-22 20:41:50 -07:00
Wez Furlong
fe7502fc0b implement coarse tab data rpc PoC
This required switching away from Rc to Arc so that the data in the
client can transit between threads.

This isn't useful yet.
2019-03-22 20:41:50 -07:00
Wez Furlong
7cdd1876d1 Enable serializing various Line and Cell related structs 2019-03-22 20:41:50 -07:00
Wez Furlong
86ed003428 factor out diff state local vars, add diff_lines method
The intent is to use this together with the terminal emulator;
when running the mux we'd like to use the Surface change stream.
2019-03-22 20:41:50 -07:00
Wez Furlong
4bdbb072f9 add ListTabs rpc 2019-03-22 20:41:50 -07:00
Wez Furlong
4269f6ff5e reduce boilerplate for the mux client 2019-03-22 20:41:50 -07:00
Wez Furlong
c6d9364901 move serial number to framing layer
This makes it generally smaller because we can use a varint encoding
for it, and avoids repeating that field in all of the pdu structs.
2019-03-22 20:41:50 -07:00
Wez Furlong
6575f50ffc the directories crate spawns a lot of children! stop using it
The `directories` crate unconditionally and eagerly tries to spawn
`xdg-user-dir` for all possible directories that it might be asked
about.  This is relatively expensive and undesirable.

Shift to the `dirs` crate instead, which doesn't seem to need
to run `xdg-user-dir` at all.

Maintain these probed dirs as singletons via lazy_static.
2019-03-22 20:41:50 -07:00
Wez Furlong
bd1b66e758 add simple ping/pong cli rpc 2019-03-22 20:41:50 -07:00
Wez Furlong
d3b3027cfc introduce subcommands; wezterm start now spawns the frontend
This is to allow adding subcommands like `wezterm cli` to interact
with the mux server.
2019-03-22 20:41:50 -07:00
Wez Furlong
891bd89939 add codec skeleton and tests 2019-03-22 20:41:50 -07:00
Wez Furlong
2b4b27c9c0 start a unix listener when running the mux server 2019-03-22 20:41:50 -07:00
Wez Furlong
0d51fd0e7d pass config into Mux 2019-03-22 20:41:50 -07:00
Wez Furlong
ea8fa17f6e add config for the mux socket path 2019-03-22 20:41:50 -07:00
Wez Furlong
05c14e5bc7 add MuxExecutor 2019-03-22 20:41:50 -07:00
Wez Furlong
0eb7f05eff GuiSender doesn't need to be pub 2019-03-22 20:41:50 -07:00
Wez Furlong
27de21ccc3 remove unused method 2019-03-22 20:41:50 -07:00
Wez Furlong
3c7eeac2da stub out muxserver frontend 2019-03-22 20:41:50 -07:00
Wez Furlong
c6acc36ee5 GuiSystem -> FrontEnd 2019-03-22 20:41:50 -07:00
Wez Furlong
943fd74d5e rename GuiSelection -> FrontEndSelection 2019-03-22 20:41:50 -07:00
Wez Furlong
6d82ee89a4 move SessionTerminated to mux module 2019-03-22 20:41:50 -07:00
Wez Furlong
bc313522a8 restructure to put gui loop and window impls closer together 2019-03-22 20:41:50 -07:00
Wez Furlong
271dd0edf4 remove unused import 2019-03-22 20:41:50 -07:00