1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-29 00:21:57 +03:00
Commit Graph

7661 Commits

Author SHA1 Message Date
Wez Furlong
eb3a78b0cb
x11: synthesize clearing dead key state when forgotten by system
It's not clear exactly how this triggers, but in setups where
a compose key has been configured (against the default for the
configured keyboard layout), it seems as though certain events
that indicate when composition is complete are not delivered,
leaving the compose cursor in an inconsistent state.

This commit attempts to detect that composing->!composing
state transition and bubble it up; when we return Nothing
and had previously had a composition string we're return
a bool to cause the caller to emit an event that clears
the composition state.

I'm not totally sure this is 100% right, but I think
it may help with the case we're discussing in
https://github.com/wez/wezterm/issues/4841
2024-01-23 15:02:50 -07:00
Wez Furlong
045e92be1b
x11: always trust key event modifiers over xkd modifiers
in discussion: https://github.com/ibus/ibus/issues/2600#issuecomment-1904322441
the summary is that the StateNotify event which is used to update
the xkd modifier state is sourced directly from the X server and
doesn't account for any state maintained by the IME.

The key press and release events do include the correct state,
so we should always prefer to use the modifiers from those events
on X11.

Under wayland, we continue to use the kbd state.

refs: https://github.com/ibus/ibus/issues/2600
refs: https://github.com/wez/wezterm/pull/4151
2024-01-23 14:26:53 -07:00
Wez Furlong
c0b61d1c6d
Revert "x11: add experimental x11_use_passive_key_updates config option"
This reverts commit c7c0cabbb7.
2024-01-23 14:09:44 -07:00
Wez Furlong
c7c0cabbb7
x11: add experimental x11_use_passive_key_updates config option
In discussion about the ongoing weirdness with modifier processing,
it sounds like we could/should be using `update_key` rather than
`update_mask` under X11.  (Wayland: has to use `update_mask`,
per the docs:
https://docs.rs/xkbcommon/latest/xkbcommon/xkb/struct.State.html#method.update_key)

I quickly tried out a proof of concept with this and it
doesn't seem to hurt, but since I'm unsure if there are other
nuances to consider, I've put this behind a config option.

`x11_use_passive_key_updates` defaults to true which results
in the use of `update_mask` on X11.

Setting it to false will switch to using `update_key` instead,
and may improve handling of xkb states.

refs: https://github.com/wez/wezterm/issues/4841
refs: https://github.com/ibus/ibus/issues/2600
refs: https://github.com/wez/wezterm/pull/4151
2024-01-23 12:19:40 -07:00
Wez Furlong
02bdd7ed56
rustfmt 2024-01-23 10:29:46 -07:00
Wez Furlong
851997cce4
x11: synthesize clearing dead key status when composing via IME
We have two different ways to compose:

* Via xkbd
* Via IME messages

In the latter case, we receive notifications from the IME about
the composed text, but are apparently not guaranteed to receive
them about the composition status overall.

This commit will synthesize clearing the composition status
when we receive the instruction to emit composed text.

The hope is that this will clear the compose cursor state
that appears to get stuck for some users of ibus + Gnome 45.

refs: https://github.com/wez/wezterm/issues/4841
2024-01-23 10:25:52 -07:00
Wez Furlong
463c457528
thread pane through to other scroll actions as well
This should allow mouse bindings that control scrolling
to also work with the hovered pane.

refs: https://github.com/wez/wezterm/issues/4835
2024-01-23 09:30:22 -07:00
Mikko Perttunen
12a6b8df84 termwiz: surface: Fix cursor movement in DiffState
DiffState keeps track of a virtual cursor in order to skip emitting
cursor location changes when a previous text change has already moved
the cursor to the desired position. However, currently the code always
advances the cursor by 1 column for each added text change regardless
of the width of the text.

Fix behavior by advancing the cursor by the width of the text.
To avoid having to add a new variable, make 'self.cursor' contain
the cursor position for the next cell instead of the current cell.

In addition, add a test verifying the behavior.
2024-01-23 06:42:13 -07:00
Mikko Perttunen
ec0cb7ce1b termwiz: surface: Fix cell diffing in presence of wide cells
The present code for creating diffs between surface regions processes
visible cells from both surfaces in lockstep. This only works when
the cells at each position have the same width in each surface.
When widths differ, the iterators go out of sync and end up comparing
cells in different positions of the surface, resulting in incorrect
diffs.

Fix this by instead iterating over the source surface ('other'), and
for each cell locating the corresponding cell in the target surface
to compare against.

To apply the fix to all three diffing functions, outline the per-line
code to a new function and call it in each function.

Also add a test that verifies the behavior in such case with differing
cell widths.
2024-01-23 06:42:13 -07:00
Ye Sijun
e3ccf2eacc Remove reserved space in full screen
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2024-01-23 06:33:16 -07:00
Wez Furlong
73c8bbb8e0
docs: changelog and update for #4426 2024-01-23 06:30:32 -07:00
Xiaopeng Li
a84e5fedb1 impl FT_PIXEL_MODE_LCD_V 2024-01-23 06:26:28 -07:00
Wez Furlong
0dedc7684d
shell-integration: update bash-preexec.sh
It seems like newer versions collide with older versions(!)

https://fosstodon.org/@jimw@mefi.social/111797116746117103

so let's update to the newest version.
2024-01-23 06:19:39 -07:00
dependabot[bot]
d72aafad08 build(deps): bump actions/cache from 2 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 06:10:59 -07:00
Wez Furlong
a471618397
shlex: update usage to avoid warnings about NUL bytes 2024-01-23 06:07:27 -07:00
Wez Furlong
97f77f3d13
cargo update 2024-01-23 05:56:01 -07:00
Wez Furlong
74e2c79d9c
docs for #4839 and apply to other areas with similar issue
refs: https://github.com/wez/wezterm/pull/4839
2024-01-23 05:55:18 -07:00
metiftikci
ff4e648834 fix: fixed palette selected row position on move down 2024-01-23 05:49:09 -07:00
Wez Furlong
76028ca154
docs: changelog for #2373 #4339 2024-01-21 18:02:15 -07:00
Travis Collins
bc4244bd65 Fix mouse scroll on hovered but unfocused pane 2024-01-21 17:59:07 -07:00
Wez Furlong
5e9688bd4e
Update Symbols Nerd Font Mono to 3.1.1
Procedure is:

* Download the `NerdFontsSymbolsOnly.zip` release asset
* Extract the font into assets/fonts
* Run the codegen to update nerdfonts_data.rs:
  `cd termwiz/codgen ; cargo run`
* Apply formatting: `cd ../../ ; cargo +nightly fmt`
* Update the list of symbols in the docs:
  * edit `docs/config/lua/wezterm/nerdfonts.md`
  * delete the table
  * Run the embedded vim command that will regenerate the table

refs: https://github.com/wez/wezterm/pull/4656
2024-01-21 16:25:04 -07:00
Wez Furlong
72fae51b00
x11/wayland: avoid including keysym name in compose cursor
refs: https://github.com/wez/wezterm/issues/4511
2024-01-21 15:49:03 -07:00
Wez Furlong
b0671294d1
docs: changelog for #3698, #3699 2024-01-21 14:37:22 -07:00
Ye Sijun
300109ccc1 support double-click on the tab bar for maximize
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2024-01-21 14:36:19 -07:00
Eric Berquist
8cb77e13c8 Fix example comment about switching zero for Fira fonts 2024-01-21 14:22:32 -07:00
dependabot[bot]
e67e725cf7 build(deps): bump stefanzweifel/git-auto-commit-action from 4 to 5
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-21 14:19:34 -07:00
Benjamin Habié
669f75f94e docs: shell-integration: Document activation by default on Arch Linux 2024-01-21 14:15:04 -07:00
Wez Furlong
13b2f2bcb5
docs: changelog for #4505 2024-01-21 14:14:00 -07:00
0xdead10cd
e54de84c14 Fixes tabbar identation when placed at the bottom of the window 2024-01-21 14:12:54 -07:00
Wez Furlong
fe24169939
docs: changelog for #4567 2024-01-21 14:11:09 -07:00
rawnly
521b7fb7ef docs: updated docs 2024-01-21 14:06:01 -07:00
Federico
b0a392b173 Update docs/config/lua/keyassignment/SetWindowLevel.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
32b0c0361a Update SetWindowLevel.md
Co-authored-by: Mike Duminy <4092035+mikeduminy@users.noreply.github.com>
2024-01-21 14:06:01 -07:00
rawnly
61786b26f3 docs: fixed spacing 2024-01-21 14:06:01 -07:00
rawnly
2dfeeb37a5 docs: docs update with macos warning 2024-01-21 14:06:01 -07:00
rawnly
5dcf67dbec chore: moved comment 2024-01-21 14:06:01 -07:00
Federico
82d05aa71a Update window/src/os/macos/window.rs
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
rawnly
6dbea8ff5e chore: run fmt 2024-01-21 14:06:01 -07:00
rawnly
32a090e353 macos: code cleanup 2024-01-21 14:06:01 -07:00
Federico
69f64dbb66 Update docs/config/lua/keyassignment/SetWindowLevel.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
7bc24ebb4d Update docs/config/lua/keyassignment/SetWindowLevel.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
1162cb764d Update docs/config/lua/keyassignment/ToggleAlwaysOnTop.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
7805ebefa7 Update docs/config/lua/keyassignment/SetWindowLevel.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
15da320b15 Update docs/config/lua/keyassignment/ToggleAlwaysOnBottom.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
9997e2beba Update docs/config/lua/keyassignment/ToggleAlwaysOnBottom.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
Federico
a3f9fc3dd5 Update docs/config/lua/keyassignment/ToggleAlwaysOnTop.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-01-21 14:06:01 -07:00
rawnly
2795cf0c4a docs: added window level options 2024-01-21 14:06:01 -07:00
rawnly
163606afec fix: moved window level state update 2024-01-21 14:06:01 -07:00
rawnly
209d039c5d fix: refactor window level + Toggle options 2024-01-21 14:06:01 -07:00
rawnly
9901866962 macos: floating window logic cleanup 2024-01-21 14:06:01 -07:00