1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 11:17:15 +03:00
Commit Graph

6344 Commits

Author SHA1 Message Date
Wez Furlong
6d375091a1 termwiz: recognize some dec private SGR codes
Recognize DEC private SGR codes that are equivalent to
super/subscript, overline and reset.

refs: https://github.com/mintty/mintty/issues/1171#issuecomment-1250317539
2022-09-19 20:46:15 -07:00
Wez Furlong
1b99690990 Add superscript and subscript cell attributes
I've expanded the number of bits from 16->32 without impacting
the overall struct sizes and reserved 2 bits for super/subscript.
I refer to these as vertical alignment properties for conceptual
consistency with css.

SGR 73, 74, 75 are used to set super, sub and normal vertical alignment.
These are compatible with mintty.

However, mintty just added support for setting both attributes to render in
small caps in 06ac446049
(https://github.com/mintty/mintty/issues/1171)
2022-09-19 06:42:14 -07:00
Wez Furlong
a59e45ab9e cargo update 2022-09-18 20:00:54 -07:00
Wez Furlong
006e19813f x11: use _NET_WM_MOVERESIZE to drag by tab bar
refs: https://github.com/wez/wezterm/issues/2530
2022-09-18 17:20:41 -07:00
Wez Furlong
5a754e44e7 avoid panic when attempting to search the launcher menu
refs: https://github.com/wez/wezterm/issues/2529
2022-09-18 13:06:29 -07:00
Wez Furlong
754d80db85 term: ignore various unsupported private mode codes 2022-09-18 09:56:31 -07:00
Wez Furlong
47f4987687 Add preliminary support for xterm's modifyOtherKeys encoding
see: https://invisible-island.net/xterm/modified-keys.html

I wouldn't be surprised if I've missed some cases, but this seems
to work for the keys mentioned in this issue:

refs: https://github.com/wez/wezterm/issues/2527
2022-09-18 08:26:08 -07:00
Wez Furlong
e2c658e598 termwiz: fix recognizing \u{1b}[>4;m as modifyOtherKeys
refs: https://github.com/wez/wezterm/issues/2527
2022-09-18 06:22:57 -07:00
Wez Furlong
427477dfb1 termwiz: update nerdfont symbol data
This makes codicons available by name to lua, and to have them
show up in the charselect modal.
2022-09-17 07:36:24 -07:00
Wez Furlong
5625ae53ed fix tests for nerdfont update 2022-09-17 06:38:22 -07:00
Wez Furlong
8fd2dd8146 fonts: update Symbols Nerd Font Mono
This is "NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete Mono.ttf" from
https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.2.2
2022-09-17 06:12:29 -07:00
Wez Furlong
1355a5f83b macos: add logging around querying appearance 2022-09-17 05:57:54 -07:00
Wez Furlong
8d2a3cf7f1 deps: cargo update 2022-09-16 07:48:12 -07:00
Wez Furlong
85db555b37 deps: update finl_unicode 2022-09-16 07:47:33 -07:00
Wez Furlong
10cd78a81a fonts: remove last resort font
I was going to upgrade to the unicode 15 font, but in testing this I
decided that the logic is slightly complex and the glyphs are often
difficult to see at most terminal font sizes, which generates questions
from users, so just fall back to notdef.
2022-09-15 08:23:58 -07:00
LitoMore
6282b1f9f2 Use SVG icon 2022-09-15 06:32:16 -07:00
Wez Furlong
243653911a update Cargo.lock for bidi update 2022-09-15 06:30:33 -07:00
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