Commit Graph
1031 Commits
Author SHA1 Message Date
Wez Furlong 89171cd706 begin async'ifying main.rs 2020-01-07 07:16:41 -08:00
Wez Furlong 41ee87f43c make Domain::attach return a Future
This avoids a hang on startup if you're using an ssh multiplexer
connection and haven't already registered your ssh key and need
to perform password authentication.
2020-01-06 22:41:59 -08:00
Wez Furlong 6a5f203e4b Fix an issue where a config reload would trigger a cascade of reloads
The last config reload time didn't seem to stick in the periodic timer
callback.

Need to investigate that further, and also see if the blink paint
time is similarly impacted.
2020-01-06 14:08:14 -08:00
Wez Furlong c7aa8cd845 fix some warnings 2020-01-06 11:42:09 -08:00
Wez Furlong 93256f3339 fix lingering after closing down
The root cause of this was a bit of a hack to ensure that we didn't
prematurely shut down while waiting for ssh sessions.

Introduce an Activity token that will extend the lifetime of the
event loop even if there are no windows present.

This cleans things up both on macos the application would linger in
the application switcher until you had tabbed away and back again,
and also for the null frontend which had grown a less gross hack.
2020-01-06 11:37:41 -08:00
Wez Furlong 2f6f3ed933 restructure to avoid borrow error
Rust maintains the borrow from the match expression for the lifetime of
the match blocks, even though there is no relationship between the
value in scope in the blocks :-/

Having separate statements makes things happier.
2020-01-06 10:00:46 -08:00
Wez Furlong 57ad948af1 mux: add bonus lines to GetTabRenderChangesResponse
The server now uses this to send the line content for
whichever line the cursor is on, which makes typing
latency better.
2020-01-06 08:36:56 -08:00
Wez Furlong b384ee4233 make it possible to re-use the line serialization in other pdus 2020-01-06 08:21:12 -08:00
Wez Furlong 0b3af1b7fe add a pdu size histogram to the stats
It tracks the serialized size of the data; here's some stats from a `--release`
build:

```
STAT                                               p50      p75      p95
Key(executor.spawn_delay)                          9.09µs   11.14µs  29.44µs
Key(gui.paint.opengl)                              7.18ms   7.86ms   28.31ms
Key(pdu.decode.compressed.size)                    161      807      2575
Key(pdu.decode.size)                               34       41       45
Key(pdu.encode.size)                               5        6        12
Key(pdu.size, [pdu = GetLinesResponse])            161      807      2575
Key(pdu.size, [pdu = GetLines])                    9        12       16
Key(pdu.size, [pdu = GetTabRenderChangesResponse]) 41       41       47
Key(pdu.size, [pdu = GetTabRenderChanges])         5        5        5
Key(pdu.size, [pdu = ListTabsResponse])            15       15       15
Key(pdu.size, [pdu = ListTabs])                    3        3        3
Key(pdu.size, [pdu = Resize])                      10       11       11
Key(pdu.size, [pdu = SendKeyDown])                 7        8        8
Key(pdu.size, [pdu = UnitResponse])                0        0        0
Key(rpc, [method = get_lines])                     729.09µs 4.06ms   10.16ms
Key(rpc, [method = get_tab_render_changes])        335.87µs 362.50µs 436.22µs
Key(rpc, [method = key_down])                      183.30µs 205.82µs 284.67µs
Key(rpc, [method = list_tabs])                     244.74µs 244.74µs 244.74µs
Key(rpc, [method = resize])                        557.06µs 1.35ms   1.82ms
Key(shape.harfbuzz)                                10.24µs  19.20µs  35.33µs
```
2020-01-06 08:03:29 -08:00
Wez Furlong f0ea9af97a renumber some pdus to make version mismatch more apparent 2020-01-06 07:54:30 -08:00
Wez Furlong b0c04c4da0 tidy up proxy path computation 2020-01-06 07:51:50 -08:00
Wez Furlong 0c88894a5a don't assume my own local build paths by default(!) 2020-01-06 07:46:37 -08:00
Wez Furlong a9a7a9662e ensure that we update fetch_pending in the error case 2020-01-06 07:42:40 -08:00
Wez Furlong 100084d6e5 remove the OpenURL pdu from the codec
Link clicking is handled locally now, so this is not needed.
2020-01-06 07:33:40 -08:00
Wez Furlong b07babb335 Closing a window closes the window, rather than the tab
refs: https://github.com/wez/wezterm/issues/101
2020-01-06 00:03:01 -08:00
Wez Furlong 8419862f12 track selection per tab again
Selection got accidentally moved to be scoped by window during
the remodel.  This commit moves it to the per tab state.

refs: https://github.com/wez/wezterm/issues/89
2020-01-05 23:23:26 -08:00
Wez Furlong 180a991760 macos: add use_ime option to disable the IME
The IME stuff on macos tends to swallow repeats for some keys.
Ugh.  So this commit adds an option to disable the use of the IME.

Switching away from it effectively inverts the meanging of backspace
and delete (because our method is no longer called by the IME), so
we need to check for that and remap it.  Ugh.

Ugh.
2020-01-05 22:54:59 -08:00
Wez Furlong bf910397dd fix error reporting if daemonize fails
This got broken in the move to anyhow
2020-01-05 20:38:53 -08:00
Wez Furlong f38e39134e reinstate scroll to bottom on input behavior
This was temporarily disabled as part of the mux datamodel changes
2020-01-05 18:17:06 -08:00
Wez Furlong fe0b9bde86 fix selection row when viewport is scrolled back 2020-01-05 17:31:45 -08:00
Wez Furlong ac2c8aadf6 fix an issue where the cursor would appear in the tab bar
If the cursor was in the first non-tab bar row, we'd incorrectly render
it in the same column on both rows.
2020-01-05 16:23:03 -08:00
Wez Furlong bda0a3b5fe windows: remove DoubleClick from input enums
double clicks weren't registering correctly with the new selection
logic.  Tell windows that we're doing all our own click counting
and simplify the logic.
2020-01-05 16:16:06 -08:00
Wez Furlong 4687b3bb48 clippy 2020-01-05 15:14:32 -08:00
Wez Furlong 89f2023577 mux: invalidate StableRowIndex 0..rows when switching alt screen
We would leave a copy of the alt screen lines at the top of the
scrollback.

This commit ensures that those lines are marked dirty and that
the dirty bits are propagated to the client to invalidate its cache.
2020-01-05 15:07:00 -08:00
Wez Furlong 9f270c25e7 mux: fix tab title at attach time
We were ignoring the title returned by list tabs and would subsequently
only pick up the title after a later update.

This passes the title in at construction.
2020-01-05 14:44:08 -08:00
Wez Furlong 94b78a47c8 mux: workaround a spurious panic notification with ssh connections
The issue is that when we start the proxy mode up, we haven't set
up a frontend, and the ssh client wants to kick off a non-essential
task via the executor.

This commit starts up a null frontend in proxy mode so that that
machinery is present.

Then, because we don't register any tabs with the mux, we need to
adjust the behavior of the null frontend to not terminate when
the mux has no tabs.

It's a little gross.
2020-01-05 14:37:17 -08:00
Wez Furlong 624c7234e4 Improve serializing hyperlinks in lines for the mux
This is both a little more efficient on the wire and results in
hovering over hyperlinks working as you would expect in the mux.
2020-01-05 14:37:17 -08:00
Wez Furlong dfa2b08c72 move URL highlight processing to the gui layer 2020-01-05 14:37:17 -08:00
Wez Furlong ad91742439 refine log levels of some debug logs 2020-01-05 14:37:17 -08:00
Wez Furlong cd2b57cc51 use rangeset to streamline line fetches 2020-01-05 14:37:17 -08:00
Wez Furlong 01f3adc2cb remove more old surface sync code, improve fetch quality
Still not perfect and still iterating
2020-01-05 14:37:17 -08:00
Wez Furlong d79455c2b4 switch most of the rest of the mux over to the new model
This mostly works, but has a cache invalidation issue wrt.
passing invalidated rows from the server to the client...
sometimes.

However, scrollback is cached on demand and selection works.
2020-01-05 14:37:17 -08:00
Wez Furlong 66b8b774f5 partially connect new data to mux rpc layer 2020-01-05 14:37:17 -08:00
Wez Furlong 400c8aa66d remove explicit dirty manipulation from Renderable
This commit leaves mux domains broken for the moment,
but also simplifes the implementation of the renderable interface.
2020-01-05 14:37:17 -08:00
Wez Furlong ed97a56055 remove viewport control from renderable trait
This is now handled 100% by the gui layer
2020-01-05 14:37:17 -08:00
Wez Furlong bc24399f06 instrument rpc size distribution 2020-01-05 14:37:17 -08:00
Wez Furlong 43dd7dd03b add harfbuzz shaping stats 2020-01-05 14:37:17 -08:00
Wez Furlong 4f5441deb6 make the stats output a bit prettier 2020-01-05 14:37:17 -08:00
Wez Furlong e4fed76bd1 instrument painting and rpc calls 2020-01-05 14:37:17 -08:00
Wez Furlong 4270d144d4 Add GetLines rpc 2020-01-05 14:37:17 -08:00
Wez Furlong f17feb305b remove highlight and mouse response bits from the rpc 2020-01-05 14:37:17 -08:00
Wez Furlong 0a1a44eef0 pass mouse grabbed state over remote tabs
This allows local double click selection to work outside vim
and for mouse reporting to work inside vim.
2020-01-05 14:37:17 -08:00
Wez Furlong c5a8531a91 fix mouse cursor after changing the selection logic
We weren't setting the cursor to an I-beam
2020-01-05 14:37:17 -08:00
Wez Furlong 1b925b593a fix reported scrollback size for surface based tabs 2020-01-05 14:37:17 -08:00
Wez Furlong bcf3d8db35 remove some dead code 2020-01-05 14:37:17 -08:00
Wez Furlong 6db31d5f64 implement triple click selection 2020-01-05 14:37:17 -08:00
Wez Furlong fac3c3c719 implement double click word selection 2020-01-05 14:37:17 -08:00
Wez Furlong 02ab0f1c3e Implement select and copy 2020-01-05 14:37:17 -08:00
Wez Furlong 5a605ea5c5 render selection locally
This enables drag to select and rendering of the selection.

Actually copying it is still TODO, as is double and triple click
handling.
2020-01-05 14:37:17 -08:00
Wez Furlong 55e4050aa3 use LastMouseClick for paste click counting 2020-01-05 14:37:17 -08:00