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

6294 Commits

Author SHA1 Message Date
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
Wez Furlong
d6929a50d1 docs for switch_to_last_active_tab_when_closing_tab
refs: #2487
2022-09-05 14:34:00 -07:00
Wez Furlong
7d4b8249d7 add switch_to_last_active_tab_when_closing_tab config option
refs: https://github.com/wez/wezterm/issues/2487
2022-09-05 10:28:02 -07:00
Wez Furlong
3583ccfc5e docs: slightly clarify language in ActivateLastTab 2022-09-05 09:50:21 -07:00
Wez Furlong
e1edd483f5 docs: link to SpawnCommandInNewTab from SpawnTab 2022-09-05 09:31:04 -07:00
Wez Furlong
44b7753ef5 docs: changelog
refs: https://github.com/wez/wezterm/issues/1209
refs: https://github.com/wez/wezterm/issues/2483
2022-09-05 09:27:37 -07:00
Wez Furlong
ea1513f480 Search incrementally in chunks of 1000 lines, show progress
This makes the search feel more responsive.

We search from bottom to top so that we show the more recent results
first, but for the sake of efficiency when accumulating result chunks
we need to reverse the order of the results vec from how it was
previously.

Each result chunk is loosely ordered from top to bottom, so we sort
it and reverse it: results[0] is the bottom-most result.

New rows are accumulated on the end of the result array; this is
not only more efficient, but it preverses the match result number
ordering.

The next/prior functions need to be swapped to account for this change
in result order.

refs: https://github.com/wez/wezterm/issues/1209
2022-09-05 09:21:20 -07:00
Wez Furlong
6b81cd4777 fix quad cache top pixel value
It was set to the first non-tab bar pixel y coordinate rather than
the line y pixel coordinate.

Move the calculation up!

refs: https://github.com/wez/wezterm/issues/2483
2022-09-05 07:52:10 -07:00
Wez Furlong
c1cfa54b61 cargo update 2022-09-05 07:36:58 -07:00
Jan Katins
29f5d066b8 Fix typo in harfbuzz.rs 2022-09-05 06:01:59 -07:00
Wez Furlong
68380188e8 fix hangul NFC shaping
We were getting data like this back from harfbuzz:

shaped font_idx=0 "파인더에서 만든 폴더" as: [.notdef=0+448|.notdef=0+448|.notdef=6+448|.notde=6+448|.notdef=6+448|.notdef=15+448|.notdef=15+448|.notdef=21+448|.notdef=21+448|.notdef=27+448|.notdef=27+448|space=33+448|.notdef=34+448|.notdef=34+448|.notdef=34+448|.notdef=43+448|.notdef=43+448|.notdef=43+448|space=52+448|.notdef=53+448|.notdef=53+448|.notdef=53+448|.notdef=62+448|.notdef=62+448]

which had a series of discontiguous and repeated runs for the same
cluster/region, but due to a logic error, we weren't coalescing them
together and were passing somewhat nonsensical ranges to the
next font for shaping.

This commit "simply" ensures that we code the checks for codepoint==0
(the `.nodef` seen above) and the results are at least correct
for this particular case.

refs: https://github.com/wez/wezterm/issues/2482
2022-09-04 21:24:30 -07:00
Wez Furlong
7158c435d5 lua: patch os.getenv with our own function
ad9490ee8f unset SHELL from the
environment on startup which had the consequence of causing
`os.getenv("SHELL")` to return `nil` when used in the config file.

Rather than simply restoring SHELL env var, recognize that reading
the environment from a long lived process is prone to seeing
stable environment forever.

We already compensate for this in the pty crate's understanding
of the base environment, so this commit patches `os.getenv`
and replaces it with our own imlementation that uses that same
logic.

The base environment logic has been extended to set SHELL from
the passwd database to round things out.

refs: https://github.com/wez/wezterm/discussions/2481
2022-09-04 15:39:28 -07:00
Wez Furlong
62ca174d19 termwiz: remove assertions
I don't think these are really necessary any more; the implementation
cannot go out of bounds, so the worst that can happen is that we
don't return any changes.

refs: https://github.com/wez/wezterm/issues/2222
2022-09-04 10:19:17 -07:00
Wez Furlong
1bb9a3fe81 docs: charselect and paneselect font & size config 2022-09-04 08:39:32 -07:00
Wez Furlong
ee436437b4 ci: expand auto-generated release description 2022-09-04 08:31:57 -07:00
Wez Furlong
c38816fc6e fontconfig: allow proportional fallbacks for codepoints
refs: https://github.com/wez/wezterm/discussions/2468#discussioncomment-3528085
2022-09-04 07:05:58 -07:00
Wez Furlong
821e833ad0 docs: changelog for 20220904-064125-9a6cee2b 2022-09-04 06:43:24 -07:00
liushuyu
9a6cee2b59 font: fix the function signature for log_buffer_message ...
... this will fix the build on non-x86 architectures
2022-09-04 06:41:25 -07:00
Wez Furlong
ecd7bc9842 docs: update for latest release 2022-09-03 20:54:27 -07:00
Wez Furlong
3bb1ed61b5 docs: pane:get_metadata
refs: https://github.com/wez/wezterm/issues/2460
2022-09-03 19:45:23 -07:00
Wez Furlong
587b0e50ff cargo update 2022-09-03 18:58:35 -07:00
Wez Furlong
9ad4f4ab5f docs: explain about ~ in default_cwd docs 2022-09-03 18:46:11 -07:00
Wez Furlong
cf40906b9a docs: refine CharSelect docs 2022-09-03 14:28:52 -07:00
Wez Furlong
a29d8ed4ae charselect: options to control copy behavior, + docs
refs: https://github.com/wez/wezterm/issues/2163
2022-09-03 13:58:50 -07:00
Wez Furlong
6471dcbc8a delete old record/replay scripts 2022-09-03 11:19:48 -07:00
Wez Furlong
0a3998887f correctly invalidate line shape data when fallback fonts load async
Ensure that the cache key changes when the shape generation changes
2022-09-03 09:31:08 -07:00
Wez Furlong
c4d19afa75 adventures in shaping
This commit is a result of debugging a problem with a particular font
where a VS2 variation of a glyph produced incorrect shaping.

Further investigation showed that this was specific to using freetype
font functions and that switching to opentype functions produces the
correct shaping information in that case.

Further-further investigation showed that this difference in behavior
was really due to the font file being out of spec and freetype returning
unexpected data as a result.

This commit allows switching to using harfbuzz's own opentype font+face
(rather than freetype) and/or switching the freetype-based font to using
opentype font functions.  These two options don't yield equivalent
results in the wezterm integration: a couple of our shaping tests
fail due to the x-advances not being the same. Those can be drastically
different in some cases (eg: I seem to get 0 for certain bitmap strikes,
and for Roboto the value is off by a factor of about 1.5).

This is incomplete and not something I want to turn on by default at
the moment, but I don't want to lose this work, hence this commit.

refs: https://github.com/wez/wezterm/issues/2475
refs: https://github.com/harfbuzz/harfbuzz/issues/3806
2022-09-03 08:34:19 -07:00
Wez Furlong
2af5a05d19 harfbuzz: allow creating an OT Face + Font
We've been using hb with freetype faces. This gives us the option
of using harfbuzz's own opentype based face and function set.

It doesn't change any behavior: this is just newly available code.

refs: https://github.com/wez/wezterm/issues/2475
2022-09-03 08:25:43 -07:00
Wez Furlong
53c6de956f harfbuzz: revise build and bindings
More recent versions of harfbuzz conveniently generate harfbuzz.cc
which has the full list of source files, so point our build to
that instead of chasing the evolving list of files: much easier!

Fixup some of the predefined symbols, and include opentype functions
in bindings.h so that we can pick those up in the bindgen output.
2022-09-03 08:20:53 -07:00
Wez Furlong
5f7738899b fix build on windows 2022-09-02 09:53:20 -07:00
Wez Furlong
804fc04630 deps: xkbcommon-rs released 0.5
can stop using my git repo for this
2022-09-02 09:25:20 -07:00
Wez Furlong
1b9ea2de3f change text cursor to fa_lock when entering passwords
There are caveats to determining this, but when we think
password entry is enabled, switch the cursor to the font-awesome
lock glyph instead of the normal cursor sprite.

fa_lock is used because it is monochrome and can thus be tinted
to the configured cursor color, and it respects blinking/easing.

refs: https://github.com/wez/wezterm/issues/2460
2022-09-02 09:00:28 -07:00
Wez Furlong
14c613a064 add Pane::get_metadata
The idea here is that different kinds of panes may want to expose
additional metadata to lua scripts. It would be a bit weird to add
a Pane method for each of those and plumb it all the way through
the various APIs, so just allowing a pane impl to return a dynamic
value (likely an Object) allows a bunch of flexibility.

This commit exposes the clientpane is_tardy boolean and the time
since the last data was recevied (since_last_response_ms) from
the mux client pane implementation: these are used to show the
tardiness indicator in the client pane.

Exposing this data enables the user to add that info to their
status bar if they wish.
2022-09-01 21:27:49 -07:00
Wez Furlong
8adc78b587 reset mouse cursor to arrow when mouse leaves the window
refs: https://github.com/wez/wezterm/issues/2471
2022-09-01 18:45:20 -07:00