1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-01 00:35:46 +03:00
Commit Graph

827 Commits

Author SHA1 Message Date
Wez Furlong
45fa44e0c8 adjust get-deps for recent deps changes
We no longer need freetype or harfbuzz from the system
2019-03-23 15:30:18 -07:00
Wez Furlong
acc895f1cd avoid deadlock while pasting large chunks of text
A big paste could saturate the input/output of the pty and
lead to an effective deadlock; the application wants to send
output to us but we are busy trying to write the paste to it.

Break up large pastes into chunks and send them piece by piece.
This does mean that a large bracketed paste is not an atomic
unit any longer, but it seems to work out ok when pasting into
vim.
2019-03-23 15:25:49 -07:00
Wez Furlong
c93f967bc4 remove esctest 2019-03-23 14:30:54 -07:00
Wez Furlong
db015e9ff1 tidy up the cargo manifest 2019-03-23 13:57:26 -07:00
Wez Furlong
10b3460c49 remove rusttype 2019-03-23 13:45:26 -07:00
Wez Furlong
40844962f3 workaround dirty zlib build 2019-03-23 13:18:55 -07:00
Wez Furlong
51a5552ce4 maybe enable windows CI 2019-03-23 12:23:48 -07:00
Wez Furlong
ed2e407df1 enable harfbuzz on windows 2019-03-23 11:53:45 -07:00
Wez Furlong
df927a84fc add zlib dep for windows builds 2019-03-23 11:30:34 -07:00
Wez Furlong
72bcd42e48 regenerate bindings on linux 2019-03-23 10:51:09 -07:00
Wez Furlong
27cb18f8ae Build our own freetype, harfbuzz
This is primarily for macos where the default freetype
installation is unable to render color emoji, but should also
help make things more consistent across the various platforms.

It's a little bit awkward on linux because the font-loader crate
pulls in the now-conflicting servo-font* crates.  I've disabled
font-loader on linux systems; it's just calling fontconfig under
the covers anyway.
2019-03-23 09:28:40 -07:00
Wez Furlong
3777da13d2 fix deprecation warnings 2019-03-22 22:17:54 -07:00
Wez Furlong
fa9bf57e86 fix line feed movement behavior
We were incorrectly treating it as \r\n, but it should only have
been moving vertically.

This fixes the positioning of the cursor when using eg:

`dialog --yesno hello 0 0`

Without this change, the cursor would be way over to the left.
With this change, the cursor is correctly positioned inside
the "YES" box.
2019-03-22 22:14:17 -07:00
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