Commit Graph
8428 Commits
Author SHA1 Message Date
Wez Furlong f06d6fc04f docs: changelog for #6328 #6873 #6875 2025-04-15 05:23:44 -07:00
Wez Furlong ade88725b0 ci/build-docs.sh: also support running under podman
Need to use regular port forwarding, rather than host networking,
for this to work for me on macos for whatever reason.
2025-04-15 05:22:39 -07:00
Benjamin Bergman e587f878bd Fix code style issues with cmp and BlendMode default 2025-04-15 05:02:01 -07:00
Benjamin Bergman 72d93c09db Fix spinner rendering glitch at certain font sizes 2025-04-15 05:02:01 -07:00
Benjamin Bergman 18049faf61 Add spinner glyphs 2025-04-15 05:02:01 -07:00
Benjamin Bergman 275833e21c Add new graph branch glyphs 2025-04-15 05:02:01 -07:00
Benjamin Bergman 2edbb81d29 Add progress bar glyphs 2025-04-14 18:31:45 -07:00
Wez Furlong d2df5b755f docs: changelog for #6860 #6868 2025-04-13 06:54:14 -07:00
Wojciech Graj e7d0424cb3 Parse all permutations of optional parameters for CSI P s ; P s X. 2025-04-13 06:52:16 -07:00
Wez Furlong 289c5f548f cargo update 2025-04-12 22:07:20 -07:00
Wez Furlong 736f73f153 vtparse: allow building in no_std environments 2025-04-12 22:06:14 -07:00
Jun Wu 50ea8c3811 termwiz: lazy_static => std::sync::LazyLock
`LazyLock` is a stdlib drop-in replacement to drop the lazy_static
dependency.
2025-04-12 22:05:40 -07:00
Jun Wu 33b40fe629 termwiz: make tmux control code optional with a Cargo feature
The tmux control code support depends on `pest`, which might be a
dependency that some projects won't need. This change makes it
optional with a Cargo feature. It's default on to maintain compatibility.
2025-04-12 22:05:40 -07:00
Jun Wu b4261af93e termwiz: make image support optional with a Cargo feature
The `image` module introduces some extra dependencies that seem a bit
heavyweight. This change adds an `image` Cargo feature to make related
features optional.

    ├── sha2 v0.10.8
    │   ├── cfg-if v1.0.0
    │   ├── cpufeatures v0.2.17
    │   └── digest v0.10.7
    │       ├── block-buffer v0.10.4
    │       │   └── generic-array v0.14.7
    │       │       └── typenum v1.18.0
    │       └── crypto-common v0.1.6
    │           ├── generic-array v0.14.7 (*)
    │           └── typenum v1.18.0
    └── wezterm-blob-leases v0.1.1
        ├── getrandom v0.3.1
        │   ├── cfg-if v1.0.0
        │   └── libc v0.2.170
        ├── mac_address v1.1.8
        │   └── nix v0.29.0 (*)
        ├── sha2 v0.10.8 (*)
        ├── thiserror v1.0.69 (*)
        └── uuid v1.15.1
            ├── atomic v0.6.0
            │   └── bytemuck v1.22.0
            └── getrandom v0.3.1 (*)

The `image` feature is default on to maintain compatibility.

Test Plan:

    cargo check --no-default-features
    cargo check
2025-04-12 22:05:40 -07:00
Wez Furlong a873585160 update lock file 2025-03-20 07:21:07 -07:00
Wez Furlong ddd60384f3 update changelog 2025-03-20 07:20:19 -07:00
Wez Furlong 4bf28e253c deps: set workspace pest dep to 2.7
This is the same version that is captured in the lock file,
but that lock file doesn't get propagated through to eg: termwiz
when published on crates.io.

Let's be explicit that we need this version because 2.1 doesn't
compile the `continue` token in our pest file:

https://github.com/wezterm/wezterm/pull/6810#issuecomment-2739610838
2025-03-20 07:18:53 -07:00
Wez Furlong d0ff5cb892 termwiz: update changelog 2025-03-19 07:27:28 -07:00
Wez Furlong 994c0a39b6 add Cargo.lock 2025-03-19 07:24:24 -07:00
Wez Furlong 8b7ca454b5 termwiz: bump version 2025-03-19 07:23:49 -07:00
Zeev Rotshtein eb9f8604e1 fix: deal with Windows Terminal mouse move with no buttons SGR report 2025-03-19 07:14:06 -07:00
mgpinf 7053748e4d refactor: remove redundant character checks in Launcher, InputSelector
We don't need to check if the alphabet includes 'j', 'k' because if a
character is included in the alphabet, the code corresponding to the
first arm is executed
2025-03-17 06:29:59 -07:00
Wez Furlong 12b971ac44 docs: changelog for #6696 2025-03-09 15:37:01 -07:00
mgpinf 9606fa2569 Add font configuration option for ActivateCommandPalette, CharSelect, PaneSelect (#6696)
* feat: option to configure font for ActivateCommandPalette, CharSelect, PaneSelect

Add configuration option for font for the below entities:
- ActivateCommandPalette
- CharSelect
- PaneSelect

For the above entities, if the font is not set in configuration, it
defaults to the font resolved in config.window_frame.font. This is in
order to maintain existing behavior of using the font resolved in
config.window_frame.font

* docs: documentation for added configuration options

Add documentation for below configuration options:
- command_palette_font
- char_select_font
- pane_select_font

* refactor: rename EntityFont to Entity

* docs: add example configuration in char_select_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* docs: add example configuration in pane_select_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* docs: add example configuration in command_palette_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* refactor: calculate make_bold in make_entity_font_impl method

* refactor: resolve font_size based on Entity

Since we can fetch font_size based on entity, we resolve it in
'make_entity_font_impl'. This removes the need to pass the pref_size
parameter

Apply changes mentioned in suggestions:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085350
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085949
2025-03-09 15:34:32 -07:00
Wez Furlong 46cfda6665 shapecache: fixup for noto font update 2025-03-09 07:37:51 -07:00
Wez Furlong 824df44296 update bundled Noto Color Emoji
This version (2.047) has unicode 16 support.

Source file is https://github.com/googlefonts/noto-emoji/blob/main/fonts/Noto-COLRv1.ttf
2025-03-09 07:00:38 -07:00
Wez Furlong 54e70e51d2 wezterm-term: revise approach to zero-width graphemes
refs: https://github.com/wezterm/wezterm/issues/1422
refs: https://github.com/wezterm/wezterm/issues/6637

When we encounter a zero-width grapheme we need to be
a little bit smarter about how we handle it.

In the original implementation we'd unconditionally
remap these graphemes into a cell, effectively making
them appear as a blank cell with width of one.

Later we discovered that eg: BIDI control characters
should not be forced to display in this way, so the
logic was changed to elide these graphemes from the
model.

Subsequently we've found that the unicode line separator
should be treated as a blank.  The unicode FAQ says
that any character that has the White_Space property
should be treated that way.

This commit applies that logic: if we get a zero-width
grapheme, if it is white space we'll force it to
have a width of 1, otherwise we'll elide it from
the model.

This probably is still not perfect, but hopefully
balances things out to be good enough, at least
until we find an example of where it isn't the right call!
2025-03-09 06:28:06 -07:00
Wez Furlong 7a45f25501 termwiz: add is_white_space_(char|grapheme) helper functions
These are not really expected to be used by most applications.
They are being added to the cell module to support some higher
level checks as part of trying to handle these wezterm issues
a bit better:

 https://github.com/wezterm/wezterm/issues/1422
 https://github.com/wezterm/wezterm/issues/6637

These functions use the White_Space properties as defined by
the UCD version 16.

I'm using the trie form of the data here because I'm already
using the ucd-trie module on other properties.  The dataset
for White_Space is quite small, and is probably fine to use
a binary search on the non-ucd form of the data, I just didn't
have an example of that code hanging around and didn't want
to have to get distracted debugging that; I somehow always
end up with an off-by-one somewhere when hooking up a binary
search for the first time!

This commit has no functional impact on termwiz or any
other crate in the wezterm repo.
2025-03-09 06:23:40 -07:00
Wez Furlong 5c6db3d9be unicode_names: update for unicode 16 2025-03-09 05:51:00 -07:00
Wez Furlong 6fc9719167 emoji_presentation: update for unicode 16 2025-03-09 05:48:52 -07:00
Wez Furlong a434ee3cd9 widechar_width: update for Unicode 16 2025-03-09 05:40:06 -07:00
Wez Furlong 9aac7b3dec docs: changelog for #6682 2025-03-09 04:32:04 -07:00
mgpinfandWez Furlong 413ebd5681 Add configuration option for InputSelector label background and foreground color (#6682)
* feat: add configuration option for InputSelector label bg and fg

Add below configuration option in config.colors:
- input_selector_label_bg
- input_selector_label_fg

If above mentioned options are not set in the configuration file then:
- input_selector_label_bg defaults to default background color
- input_selector_label_fg defaults to default foreground color

* docs: add InputSelector label bg, fg options to Colors & Appearance

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-09 04:29:13 -07:00
Joe XueandWez Furlong 4ce83f093a fix: tmux -CC error on %config-error (#6773)
* fix: tmux -CC error on %config-error

refs: #6763

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-09 04:25:53 -07:00
Joe Xue dd546c9d98 Reorg the code to put rules/events in alphabet order 2025-03-08 19:24:19 -08:00
Wez Furlong cdd70030ea docs: docs and changelog for #6558 2025-03-08 17:21:09 -07:00
Jay Madden c0b29fef24 feat(macos): add support for titlebar background matching theme background on macos
closes: #6558
2025-03-08 17:13:37 -07:00
Wez Furlong 7aadebfe48 termwiz: fix panic when appending long runs to clusterline
There were two different overflows that could happen here when
resizing the terminal from a narrow width to a much wider width,
when the input consists of very very long logical lines.

The first was that we could overflow the maximum number of
cells in the ClusteredLine struct, which had u16 as its type.

The second, after changing u16 to u32, was the maximum length
of a run of cells with the same attribute.

The former could be fixed, preserving the smaller integer type,
by adjusting the API to allow it to return the overflow, but
that feels awkward and we could just increase the size of
the integer type.

The latter can be caught with an overflowing_add operation
and breaking the run in the overflow case.

That is what this commit does.

+bump codec version because this causes a small change
in the serialization of line data used by the mux
protocol.

refs: https://github.com/wezterm/wezterm/issues/6729
2025-03-08 12:25:06 -07:00
Wez Furlong e8d84eeb53 docs: changelog for #6677 2025-03-08 10:24:14 -07:00
mgpinfandWez Furlong 46f74a5bf7 Add alphabet to launcher args (#6677)
* feat: add alphabet argument to ShowLauncherArgs

- The labels are now based on the provided argument or the default value
- The 'alphabet' string defaults to "1234567890abcdefghilmnopqrstuvwxyz"
- Optional argument 'alphabet' is added to 'ShowLauncherArgs'

* docs: update documentation for ShowLauncherArgs

* fix: push (max_label_len+3) whitespaces if always_fuzzy false in InputSelector

This is to handle the edge case in InputSelector when max_label_len is 2
and the labels shift one place to the left when entering fuzzy mode and
back one place to the right when exiting fuzzy mode.

* fix: push (max_label_len+3) whitespaces if 'FUZZY' not present

This is to handle the edge case in Launcher when max_label_len is 2
and the labels shift one place to the left when entering fuzzy mode and
back one place to the right when exiting fuzzy mode.

* feat: add configuration option for Launcher alphabet

- This is in order to be able to configure the alphabet for
  actions corresponding to KeyAssignment enums 'ShowLauncher',
  'ShowTabNavigator'
- If `launcher_alphabet` configuration option not set, the value
  defaults to '1234567890abcdefghilmnopqrstuvwxyz'

* docs: add launcher_alphabet documentation

* docs: update documentation for ShowLauncherArgs

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-08 10:22:11 -07:00
Wez Furlong 4e5341efd0 docs: changelog for #6707 2025-03-08 10:19:53 -07:00
mgpinfandWez Furlong 2dda592ba6 Add Confirmation to Key assignment (#6707)
* feat: add Confirmation to KeyAssignment

This displays a confirmation menu similar to close menu.
An optional cancellation action that is triggered when the user
cancels/declines.

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-08 10:18:40 -07:00
Wez Furlong 18371a158c termwiz: add update-changelog.sh
This has the appropriate invocation of git-cliff to update
the changelog

refs: https://github.com/wezterm/wezterm/pull/6709
2025-03-08 06:38:09 -07:00
Josh McKinney e6a323745e Update termwiz Changelog with git-cliff
This is not perfect, but maybe useful
2025-03-08 05:18:00 -08:00
mgpinf 8ae3d27b09 feat: display quick select label and match in bold 2025-03-08 05:11:07 -08:00
Joe Xue 18f7c03d6c Tmux -CC: disable win32 input mode in the control pane (#6768)
On windows, if win32 input mode is active, key presses are encoded by the GUI and will bypass
the key_down logic that we use to detect when the user presses `q` to exit from `tmux -CC` mode.

This commit forces the keyboard encoding to be standard Xterm encoding for the pane
that is running `tmux -CC` mode so that we can catch the `q` press.
2025-03-08 05:33:48 -07:00
S H 622e404be2 Update custom_block_glyphs.md
Correct link for u2500
2025-03-07 12:08:43 -08:00
Wez Furlong 88905822bf fix: SO_SNDBUF too large on *BSD
closes: https://github.com/wezterm/wezterm/issues/6712
2025-03-07 10:37:29 -07:00
Wez Furlong 2d78db855a mux: fixup debug level for tmux -CC control pane
No need to log an error for each key press
2025-03-07 10:16:19 -07:00
Wez Furlong 60c3f756e4 docs: changelog for #6602 #336 2025-03-07 10:02:37 -07:00