8795 Commits
Author SHA1 Message Date
Wez Furlong fcd5512709 fix misclassification of mouse events
While looking at https://github.com/wez/wezterm/issues/945 I noticed
that mouse moves were being considered to be drag events even though
no mouse buttons were held down.
2021-07-15 22:25:35 -07:00
Wez Furlong b4c4c85683 changing the active pane now passes the focus event to the terminal
Test scenario is:

* Create a split
* in each pane run: `printf "\e[?1004h" ; od -c`
* Focus the panes, focus another window, and focus the window again
* The I and O events appear in the panes when changing their focus.
* Previously, only the active pane would get focus events when the
  window focus changed.

refs: https://github.com/wez/wezterm/issues/941
2021-07-13 08:58:18 -07:00
Wez Furlong ac5199c216 config: add bypass_mouse_reporting_modifiers option
This allows changing eg: SHIFT to ALT for bypassing mouse reporting.

refs: https://github.com/wez/wezterm/issues/911
2021-07-11 22:02:23 -07:00
nick blackandWez Furlong d337677b8e [terminfo] add smxx/rmxx, purge blink (#905)
* [terminfo] add smxx/rmxx, purge blink

Testing with WezTerm nightly indicates no blink support
available through the xterm \E[5m, and I didn't see any
support in the code -- purge it. smxx and rmxx, meanwhile,
have been added to indicate support for struck text.

* restore blink

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2021-07-11 21:36:56 -07:00
Wez Furlong a7326f6c41 cargo update 2021-07-11 20:08:24 -07:00
Wez Furlong 5c4fb92b87 fixup wgpu example 2021-07-11 12:46:23 -07:00
Wez Furlong 1bb2f50eb7 fixup windows build 2021-07-11 09:50:50 -07:00
Wez Furlong edee1335c1 mux: remove parsing bottleneck
Test scenario is `cat`ing the public domain wiki text data from
http://cs.fit.edu/~mmahoney/compression/enwik8.zip in the terminal;
that file is 96M in size.

`time cat ~/Downloads/enwik8.wiki`

Prior to this change, depending on the OS, the time to cat the file
could be several minutes.

Digging in, the bottleneck appears to be that there isn't sufficient
parallelism between the reader and the parser, which means that the
rate of reading data is constrained by how long it takes to parse
and render a frame.

This commit switches away from using a synchronized vecdeque to
effectively create a non-blocking pipe, to "simply" using a socketpair
with a larger buffer size.

We now do blocking pty read -> write to socketpair in the reader
thread, and then read socketpair -> parse in the other.

The key difference between before and after being that the pty read
can continue to read and accumulate data (with an upper bound, so
that CTRL-C is still responsive) while we're parsing and rendering
a frame.

This increases the throughput for this scenario, bringing it down
from ~3:30 to ~17 seconds on this Ryzen 2700X system.

refs: https://github.com/wez/wezterm/issues/927
2021-07-11 08:26:35 -07:00
Wez Furlong be680955d7 scroll to bottom on paste
closes: https://github.com/wez/wezterm/issues/931
2021-07-10 22:04:43 -07:00
Wez Furlong 566243ade5 mux: add some metrics around reading from ptys 2021-07-10 21:06:54 -07:00
Wez Furlong 77c5acaaf5 fixup tests on macos 2021-07-10 19:01:20 -07:00
Wez Furlong 37ec16329e fixup tests + wayland bits 2021-07-10 18:07:16 -07:00
Wez Furlong cc2b9507f8 fixup build on windows 2021-07-10 17:52:14 -07:00
Wez Furlong 6aa575d838 fixup build on macos 2021-07-10 17:42:05 -07:00
Wez Furlong db6da81272 window: move away from async event queue
I added this originally thinking that it would make it easier to resolve
https://github.com/wez/wezterm/issues/695 and to integrate wgpu support,
but it's the cause of https://github.com/wez/wezterm/issues/922 so let's
take it out and more directly connect the window events to those in the
terminal.

This commit likely breaks mac and windows; pushing it so that I can
check it out and verify on those systems.
2021-07-10 17:30:19 -07:00
Wez Furlong ad19b4f57b window: de-Future most of the WindowOps methods 2021-07-10 17:30:19 -07:00
Wez Furlong 4e99edf6f5 CellAttributes: split color into thin/fat components
The common palette indices are in the main cell attributes.
Using true color will allocate fat storage.

This allows reducing the Cell size from 32 -> 24 across the
implementation of storing 10 bpc color (it peaked at 40 in
the last couple of commits).
2021-07-10 15:42:15 -07:00
Wez Furlong 47839adf95 CellAttribute: move fg/bg color accesses to accesors
This facilitates hiding the raw fields in the next diff
2021-07-10 15:15:36 -07:00
Wez Furlong 1a673a5e5b RgbColor: store 10bpc
This makes Cell larger; will compensate in following diff
2021-07-10 15:06:32 -07:00
Wez Furlong 9c77d56026 RgbColor: hide internal red, green, blue fields
I'd like to adjust this to support 10bpc color, so the first step
is hiding the individual 8bpc fields.
2021-07-10 14:22:31 -07:00
Wez Furlong 0208e91cbd docs: changelog for https://github.com/wez/wezterm/issues/933
closes: https://github.com/wez/wezterm/issues/933
2021-07-10 08:22:41 -07:00
Wez Furlong cd1f7b1784 x/wayland: remove Mod3 -> SUPER mapping
I'm not sure where this came from in its originating commit
(05a60e6e8b), but it is inconsistent with
the reverse mapping function added in that same commit:
https://github.com/wez/wezterm/blob/05a60e6e8b1f1aae36d7564445c8d678b5e03277/window/src/os/x11/xkeysyms.rs#L3

It is causing problems in https://github.com/wez/wezterm/issues/933
and is rarely used by default, so it seems safe to just remove
this mapping.
2021-07-10 08:04:28 -07:00
Wez Furlong 313d130deb remove cluster from GlyphPosition
This simplifies the code and avoids a call to reverse the
cluster to the cell index.
2021-07-09 22:46:16 -07:00
Wez Furlong fc4c165ca3 window: update wgpu -> 0.9
This is still used only in an example
2021-07-09 20:37:34 -07:00
Wez Furlong 91d6344180 weird dependency hack for mac+windows
Adding an edge from wezterm-ssh -> async_ossl causes the
openssl vendoring feature selection logic to trigger, which
in turn allows `cargo build -p window --examples` to succeed
again on macos.
2021-07-09 20:34:42 -07:00
Wez Furlong 70ec166076 shaper: micro-optimize some of the harfbuzz stuff
Probably not super effective compared to all the Vec stuff
going on in here, but it can't hurt.
2021-07-09 19:56:31 -07:00
Wez Furlong 2ed3cbe313 add per-line render latency histogram 2021-07-08 09:58:48 -07:00
Wez Furlong 7287447f33 refactor: hoist some params to higher render level
and pass down via params struct
2021-07-08 09:51:11 -07:00
Benoit de Chezelles 71ff0441c4 Rename cell_* to dot_area_* for clarity 2021-07-08 09:30:27 -07:00
Benoit de Chezelles 313365771d micro-opti: Pre-calculate bit masks for braille dots pattern 2021-07-08 09:30:27 -07:00
Benoit de Chezelles 6f64c747e8 Update changelog for braille 2021-07-08 09:30:27 -07:00
Benoit de Chezelles f3b5365c85 Add test-data files for braille characters 2021-07-08 09:30:27 -07:00
Benoit de Chezelles 249f9dfe29 Use squares instead of circles for braille dots (for simplicity & perf) 2021-07-08 09:30:27 -07:00
Benoit de Chezelles d48cf4e5ee Few micro-optimizations for performance 2021-07-08 09:30:27 -07:00
Benoit de Chezelles 831f3a8b51 Make the braille dots smaller (and the code clearer!) 2021-07-08 09:30:27 -07:00
Benoit de Chezelles 3d9e791b84 glyph: Add working braille custom glyphs 2021-07-08 09:30:24 -07:00
Wez Furlong 381a17d897 capture some more latency measurements in histograms 2021-07-08 08:54:10 -07:00
Wez Furlong e4b2a5c55a cache style-derived data in the line render loop
Just a simple cache to avoid repeated computation for space-separated
runs of clusters with the same attributes.
2021-07-08 08:36:54 -07:00
Wez Furlong 33309d95ac refactor: extract cached_cluster_shape from line renderer 2021-07-08 07:56:01 -07:00
Wez Furlong 2c1b532281 avoid lookup after shape cache miss 2021-07-08 07:48:13 -07:00
Wez Furlong d32c6fca23 refactor: extract resolve_fg_color_attr to module scope 2021-07-08 07:46:21 -07:00
Wez Furlong 33c87611dc remove use of cluster cell idx in ls-fonts 2021-07-08 07:25:35 -07:00
Wez Furlong b08a6ab5ef instrument cache hit rates, fix duration histograms 2021-07-07 17:21:18 -07:00
Wez Furlong aac2e78970 update http_req -> 0.8
0.8 doesn't seem to build with rusttls, but I don't think
we need that any more: we've been using vendored openssl on windows
and mac for some time.

closes: #924
refs: https://github.com/jayjamesjay/http_req/issues/48
2021-07-07 13:37:57 -07:00
Wez Furlong 4f29f2bc80 cargo update 2021-07-07 13:27:16 -07:00
Benoit de Chezelles c03b6946f6 Add light line vs heavy line test data file 2021-07-07 13:26:23 -07:00
Benoit de Chezelles a35aeca082 glyphs: Make heavy lines visibly heavy 2021-07-07 13:26:23 -07:00
Benoit de Chezelles 4f7b21d532 docs: Add note on issues with binding mouse Up event only 2021-07-04 09:53:57 -07:00
Wez Furlong 5b135a6e50 fix auto-complete-o 2021-07-04 09:43:34 -07:00
Wez Furlong 47fc6cac64 fixup build on linux 2021-07-04 09:30:16 -07:00