Custom branch-drawing glyphs (U+F5D0..U+F60D) previously stroked fading lines (0xF5D2..0xF5D5) and BlockKey::Branches segments with PolyStyle::OutlineHeavy, matching heavy box-drawing glyphs instead of light box-drawing lines (U+2500/U+2502/U+256D..U+2570) and making strokes nearly as wide as the 2/5-radius commit circles.
Switch those strokes to PolyStyle::Outline so branch lines match standard light box-drawing weight and commit nodes remain distinct.
Fixes#8382
Co-authored-by: Yanuo Ma <220247883+yanuoma@users.noreply.github.com>
MuxNotification::AssignClipboard was picking any window for clipboard
ownership. With 2+ windows open, OSC 52 from a pane in a newer window
set the clipboard owner as being an unrelated window.
Resolve the pane to its mux window and use the window that owns it,
only using the first/any window if the pane has no associated gui window
(e.g. a non-current workspace).
I know, this is a bit crappy. This variable is intended to help
with logical/physical mapping for RTL text. It is calculated
but not used.
Ideally we'd just delete this code, but this particular bit
of logic is thorny enough that I want to preserve it for
when someone does sit down to finish this bit.
Draws a braille spinner in the tab title when a pane reports
Indeterminate progress, advancing one frame every 100ms.
This only shows when no format-tab-title event is used, and
leverages some of the infra we have for git animation scheduling.
During workspace switches, the mux subscription callback would cancel itself when receiving WindowRemoved notifications for a stale mux_window_id.
This caused the render loop to stop receiving PaneOutput events, freezing
the display until next user input.
So we keep the subscription alive during transient "window not found"
conditions instead of cancelling it, and only mark it as dead when the Window
is Drop'ed.
When using WebGPU front end, creating and closing windows will cause
VM:IOSurface memory leak, due to an unreleased object reference.
Also with some other trivial memory leak prevention measures.
Fixes a bunch of warnings like this:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> window/src/os/macos/window.rs:670:23
|
670 | fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
| ^^^^^ ------------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
670 | fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
| ++++
```
This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
Now that validating service menu items doesn't loop forever, it can be
re-enabled.
It still won't have all possible services listed until/unless validation
is implemented more thoroughly, but some are already present.
The current `pct_to_glyph` algorithm would unintentionally produce `\u{f0aa6}`
for percentages in the range 96..=100.
Use a different algorithm that:
* uses an empty circle for the first 5%
* uses a filled circle for the last 5%
* has a roughly even distribution for the rest of the range
* feat(mark-last-tab): append last tab name with '*'
I think there should be a better method instead of make the save function so crowded.
But this works for now similar to `tmux` windows. But, `tmux` is using '*' for current and '-' for last
Hardcoded '*'
* Revert "feat(mark-last-tab): append last tab name with '*'"
This reverts commit 6f11c16dd9b034977088820fbc86a4456df9d513.
* feat(tab): add is_last to indicate previous active tab - last tab.
Add usage example to format-tab-title.md
Add docs to TabInformation.md
Couldn't add tests, perhapse can you guide on adding test for this?
* Update docs/config/lua/TabInformation.md
renaming as suggested.
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
* Update wezterm-gui/src/termwindow/mod.rs
renaming as suggested.
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
* Update docs/config/lua/window-events/format-tab-title.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
* refactor: rename `TabInformation` attribute to `is_last_active`
---------
Co-authored-by: Omar Elmasri <omarmasri@duck.com>
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
Add below configuration option in config.colors:
- launcher_label_bg
- launcher_label_fg
If above mentioned options are not set in the configuration file then:
- launcher_label_bg defaults to default background color
- launcher_label_fg defaults to default foreground color
* fix: honor environment variables and cwd unconditionally for SpawnCommand
The SpawnCommand specifies information about a new command to be spawned.
If the args field is omitted, the default program for the target domain
is spawned. However, this also causes other fields like environment
variables and cwd to be wiped out.
The command builder now behaves consistently for all fields, whether the
args field is set or omitted.
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
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
* 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>
* 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>
* 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>
* feat: optionally disable non-matching text attributes in Quick Select
Add a configuration option
'disable_attributes_for_non_matching_text_in_quick_select' that disables
all attributes for non-matching text in Quick Select Mode.
The default value for
'disable_attributes_for_non_matching_text_in_quick_select' is false
This resolves the issue https://github.com/wezterm/wezterm/issues/4022
* docs: documentation for disabling attributes for non matching text in QuickSelect
Add documentation for the below configuration option:
- `disable_attributes_for_non_matching_text_in_quick_select`
* feat: display quick select label and match in bold
* refactor: fetch colors from existing reference to config
* fix: reset additional attributes for non matching text
Reset additional below mentioned attributes to default for non matching
text if the configuration option
disable-attributes-for-non-matching-text-in-quick-select-mode is true
- Italic
- Blink
- StrikeThrough
- Invisible
- Hyperlink
* fix: update attributes to reset
* feat: add reset_attributes function in termwiz cell
Add reset_attributes function in termwiz cell
Use the above function to reset cell attributes for the cell
* refactor: update method name to clear_attributes
* termwiz: update version because public method has been added
Update termwiz version because a new method 'reset_attributes' has been
added in termwiz/src/cell.rs
* fix: update get_lines method in quickselect to be same as with_lines_mut
* termwiz: simpler method name, implementation to clear cell attributes
Use simpler method name and implementation as per suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966596988
* refactor: clear cell attributes for every line if flag is set
Clear attributes for every line if the configuration option
disable-attributes-for-non-matching-text-in-quick-select has been set
Partially implement changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966597826
* refactor: replace for loop with for_each method to iterate through cells
Partially implement changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966597826
* refactor: rename configuration option to quick_select_remove_styling
Rename option to remove styling in quick select from
'disable_attributes_for_non_matching_text_in_quick_select' to
'quick_select_remove_styling'
Implement changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966598496
* fix: remove bold attribute when displaying quick select label, match
This is in order to raise this in a separate PR
Suggestion mentioned here
https://github.com/wezterm/wezterm/pull/6683#issuecomment-2676394535
* docs: update documentation for quick_select_remove_styling
* termwiz: just bump minor part
Since the only change in termwiz is addition of a public method, it
should be forward compatible, so we can just bump the minor part
Apply changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966600258
* fix: clear attributes for each cell in all lines in get_lines method
Apply changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966848308
* fix: clear appdata for line after clearing attributes of each cell
Move call to clear appdata for line after the call to clear attributes
from each cell when configuration option 'quick_select_remove_styling'
is enabled
Apply changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966848015