Commit Graph
6327 Commits
Author SHA1 Message Date
Wez Furlong 8b32ed483a bidi: exclude test data from crates.io
I thought that I might need to do something to make the tests
happy with this, but they are not run as part of the pre-publish
checks and they shouldn't be run once vendored, so perhaps it
is just as simple as excluding and publishing?

refs: https://github.com/wez/wezterm/issues/2518
2022-09-15 06:27:29 -07:00
Wez Furlong fe78b5821f cargo update 2022-09-12 06:26:10 -07:00
Benoit de Chezelles ed10f0de51 Fix typo 2022-09-11 12:10:53 -07:00
Wez Furlong cf989fb9da docs: update for MuxPane/Pane merger 2022-09-11 07:21:54 -07:00
Wez Furlong 42e4a51a28 lua: no longer distinction between gui and mux panes
There is no gui-specific functionality for PaneObject, so
just fold everything into MuxPane and use that.
2022-09-11 07:05:48 -07:00
Wez Furlong a99920da0b lua-api-crates/mux: refactor
split out multiple multiples
2022-09-11 06:44:55 -07:00
Wez Furlong 295677ed52 config: cursor_thickness, strikethrough_position, underline_position, underline_thickness
refs: https://github.com/wez/wezterm/issues/2326
refs: https://github.com/wez/wezterm/issues/2505
2022-09-10 18:34:35 -07:00
Wez Furlong 72674f5d28 perf: reduce number of calls to Line::get_cell
The clustered line storage impl of get_cell() is O(column-index)
as cells have to be iterated in order.

The render pass was calling it 3 times to resolve information
about the cursor; reduce that to just once.

It was also calling it once per cell to determine whether the
cell needed to be replaced with a custom glyph if custom block
glyphs were enabled, making it accidentally quadratic!

While it wasn't especially expensive, it did show up in profiling,
so this commit removes that call: we can cache the block glyph
key in the shaper info which is a better place for it anyway,
so that's what we do.

Similarly, there was some extraneous work to call get_cell
when computing some shaper info; remove that too!

That one might be slightly contentious: the is-followed-by-space
logic used to check the successor cell by index to see if it
was a space, but now looks at the successor shaped glyph to see
if it was a space. That might actually be a better choice, but
it may have some ripple effects.
2022-09-10 09:11:22 -07:00
Wez Furlong e1a0b63923 termwiz: track size of sgr enum 2022-09-10 07:23:11 -07:00
Mathieu Ablasou 7190d01fd6 Fix miswording 2022-09-10 07:19:02 -07:00
Wez Furlong 96c4e7e9b9 Switch to finl_unicode for grapheme clustering
According to its benchmarks, it's almost 2x faster than
unicode_segmentation.  It doesn't appear to make a visible
difference to `time cat bigfile`, but I'll take anything
that gives more headroom for such little effort of switching.
2022-09-10 07:15:49 -07:00
Wez Furlong a0c2df2d86 Line: save 8 bytes per line 2022-09-09 21:39:31 -07:00
Wez Furlong 55fa2e7893 fmt 2022-09-09 21:22:17 -07:00
Wez Furlong ef14f78e08 Reduce size of Action
Action is used to encode parsed terminal output and shuttle it between
the thread that does the parsing and the main gui thread that applies
it to the terminal model.

Take it down from 184 bytes to 40 bytes (on 64-bit systems).  This seems
to boost `time cat bigfile` by reducing the runtime to ~40% of its prior
duration: down from 8s -> 4.5s on an M1 macbook air.

Size reductions achieved by Box'ing relatively less frequently
used enum variants. The kitty image data variant is particularly
large, and the Window variant is also pretty heavy.
2022-09-09 21:11:11 -07:00
Wez Furlong 7a0461989e termwiz: add test to track size_of Action
no functional change
2022-09-09 21:03:19 -07:00
Wez Furlong 9bcc4e0bbc get-deps: user-contributed support for void linux
Unsure if this is 100% correct, but it is at least a starting point
2022-09-09 09:03:07 -07:00
Wez Furlong ad35b9dc21 Add compile time features to allow building without vendored fonts
closes: #2305
2022-09-09 08:53:39 -07:00
Wez Furlong 39dd4cdd82 Add config options to control various cache sizes
These are more for low level testing than they are intended
for users to play with, so they are deliberately undocumented
at this time.
2022-09-09 07:30:53 -07:00
Wez Furlong 25cd05a80a ls-fonts: cut over to glyphcache's rasterizer
This way we get the same metrics and rendering as used by
the main termwindow
2022-09-08 19:16:26 -07:00
Wez Furlong 598f5081ec respect invisible text attribute
This is a weird attribute TBH.

xterm seems to replace the cells with spaces: copying and pasting
results in spaces.

Kitty ignores it.

VTE doesn't render it but allows copying and pasting.

The latter is now also the behavior in wezterm.
2022-09-08 08:43:27 -07:00
Wez Furlong 5a4ff6afc5 add tty-test.txt for showing most attributes 2022-09-08 08:14:29 -07:00
Wez Furlong b3a1fc75f5 docs: normalize_to_nfc
refs: https://github.com/wez/wezterm/issues/2482
2022-09-08 07:21:36 -07:00
Wez Furlong e1034df1f0 docs: changelog for https://github.com/wez/wezterm/issues/2500
closes: https://github.com/wez/wezterm/issues/2500
2022-09-08 07:03:57 -07:00
Wez Furlong 1cb31aa46a docs: changelog for https://github.com/wez/wezterm/pull/2491 2022-09-08 06:52:38 -07:00
unrelentingtech d8a7d76cf5 colors: regenerate scheme data after previous commits 2022-09-08 06:51:01 -07:00
unrelentingtech c1225281dc colors: add base16 indexed colors 16-21 like base16-shell sets 2022-09-08 06:51:01 -07:00
unrelentingtech 9a72c03631 colors: fix base16 cursor having the same bg and fg 2022-09-08 06:51:01 -07:00
Wez Furlong 2bbad26dd1 sixel: skip setting pixel if x-coord is out of range
speculative fix for https://github.com/wez/wezterm/issues/2500
which doesn't repro for me(!)
2022-09-07 16:47:42 -07:00
Wez Furlong c0fff4e843 Add wezterm.gui.default_key_tables()
This provides a means for more easily extending the default key
tables without forcing the user to recreate the entire config
for themselves.

wezterm.gui.default_keys is also added by this, but it is likely
not as useful.
2022-09-07 10:21:54 -07:00
Funami580 cd2c2a1a83 charselect: add option to cycle to previous group of characters 2022-09-07 10:21:35 -07:00
Wez Furlong 66c267ef28 docs: fix typo 2022-09-07 09:24:42 -07:00
Wez Furlong 5cae889ca4 remove test for deleted method 2022-09-07 07:55:08 -07:00
Wez Furlong 026b9e3577 fix hyperlink underlines
There were two problems:

* We weren't correctly invalidating when the hover state changed
  (a recent regression caused by recent caching changes)
* We'd underline every link with the same destination on hover,
  not just the one under the mouse (longstanding wart)

Recent changes allow the application layer to reference the underlying
Lines directly, so we can restore the original and expected
only-highlight-under-the-mouse by switching to those newer APIs.

Adjust the cache values so that we know to also verify the current
highlight and invalidate.

I was a little surprised to see that this also works with mux client
panes: I was expecting to need to do some follow up on those because
they return copies of Line rather than references to them. That happens
to work because the mux client updates the hyperlinks at the time where
it inserts into its cache. The effect of that is that lines in mux
client panes won't update to new hyperlink rules if they were received
prior to a change in the config.

refs: https://github.com/wez/wezterm/issues/2496
2022-09-07 07:51:28 -07:00
Wez Furlong 77ed919098 invalidate the display when using ClearScrollback("ScrollbackAndViewport")
refs: https://github.com/wez/wezterm/issues/2498
2022-09-07 05:36:50 -07:00
Mikayla Maki 32771eecc6 Rearranged order of trimming and parsing 2022-09-06 20:14:27 -07:00
Mikayla Maki d74cb1b625 Added extra test 2022-09-06 20:14:27 -07:00
Mikayla Maki d7c4898f3d Add tests for sysctl parsing 2022-09-06 20:14:27 -07:00
Mikayla Maki 75a7c38800 Change wording 2022-09-06 20:14:27 -07:00
Mikayla Maki ffae6818ef Fixed small bug in how procinfo reads sysctl KERN_PROCARGS2 2022-09-06 20:14:27 -07:00
K Simmons 6166008b18 Make procinfo's lua dependency optional 2022-09-06 20:14:27 -07:00
Wez Furlong dbacf98b89 fix incorrect underline attribute when scrolling
Given this sequence:

ENABLE-UNDERLINE CRLF SGR-RESET

if the CRLF caused the terminal to scroll, the newly created line
at the bottom would be filled in with a "blank" cell that had
the underline attribute set.

That's because we're supposed to preserve the coloring in that
scenario, but we were also preserving other SGR attributes.

This commit explicitly clears out under, over and strikethrough
lines from these blank attributes.

refs: https://github.com/wez/wezterm/issues/2489
2022-09-06 20:06:01 -07:00
Wez Furlong d8e43b92b8 termwiz: slim down size of clustered line storage
Move is_double_wide to a box; it is relatively rare to need
this and we're okay with it being a separate heap allocation
when it is needed if it reduces the size of Line in the common case.
2022-09-06 18:56:29 -07:00
Wez Furlong 72c83e0599 ls-fonts: fix ascii rasterization of emoji/bitmap fonts
Need to scale them using the same rules we do when the window
renders them for real.

wezterm  ls-fonts --text "$(printf hi\\U1faf0💩)" --rasterize-ascii
2022-09-06 18:49:20 -07:00
Wez Furlong c25e6820ef add normalize_to_nfc config option
refs: #2482
2022-09-06 08:58:09 -07:00
Wez Furlong bcc4015bc4 docs: fix typo 2022-09-06 07:58:13 -07:00
Wez Furlong e585178d2f docs: changelog for #2452 #2492 2022-09-06 07:33:35 -07:00
unrelentingtech 682e83433d wayland: only cancel key repeat when the *held* key was released, fixes #2452 2022-09-06 07:31:08 -07:00
Orhun Parmaksız 77024fa109 ci: correctly set the tag for release description
While using here-doc, lines are not expanded for parameter expansion if
a part of starting _word_ (_EOT_ in this case) is quoted. This results
in '$name' parameter appearing in auto-generated link without expansion.
This commit removes the single quotes from here-doc thus sets the
correct tag which is retrieved by '$1'.

Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-09-06 07:13:55 -07:00
Wez Furlong 86c9d78148 shaper: restart presentation=None from font_idx=0
When falling back to presentation-ambivalent font lookup, restart
our shaper run from font_idx=0 rather than the current font index.

For:

```
wezterm  ls-fonts --text "$(printf \\U1faf0)"
```

the current font index was the last resort font so we'd never
search over anything useful in the second pass.

Looking back at 4fc8dfb374, I can't
see a good reason for starting at the later offset.
2022-09-05 17:10:04 -07:00
Wez Furlong 02f769d36c docs: publish release 2022-09-05 14:36:08 -07:00