1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00
Commit Graph

5618 Commits

Author SHA1 Message Date
kumattau
c890c238c1 Add support of IME preedit rendered by system on Windows 2022-05-22 06:02:51 -07:00
Wez Furlong
ecd05547d5 Add SplitPane assignment
This, along with the plumbing included here, allows specifying
the destination of the split (now you can specify top/left, whereas
previously it was limited to right/bottom), as well as the size
of the split, and also whether the split targets the node at the
top level of the tab rather than the active pane--that is referred
to as full-width in tmux terminology.

https://github.com/wez/wezterm/issues/578
2022-05-21 21:09:11 -07:00
Wez Furlong
d2d4257f79 Add RotatePanes key assignment 2022-05-21 17:10:04 -07:00
Wez Furlong
da7da888cd config: generate errors for things like --config tarm=foo
Invalid option names, or values that evaluate as nil (such as the `foo`
above: that's treated as a global variable reference, but `foo` isn't a
defined global and evaluates as `nil`) will now cause the program
startup to error out with an actionable error message.

Previously, the invalid config name would generate a warning, and the
invalid value would silently have no effect as it has the same effect as
omitting the named value and leaving it as its default value.

I think these cases should both immediately error out and stop
further processing, so that's what we're doing.

This commit also adds support for adding:

```
   #[dynamic(deprecated = "use newer option instead")]
   pub some_config_value: bool,
```

but not options currently use this.
2022-05-21 13:10:30 -07:00
Wez Furlong
736169a752 add min_scroll_bar_height config option
refs: https://github.com/wez/wezterm/issues/1936
2022-05-21 10:06:18 -07:00
Wez Furlong
107d3d2378 search mode can now default to searching the selection text
To do this, we split `Pattern` into the underlying pattern for the mux
layer (which is part of the codec), and another for the config layer,
so that we can specify this new mode.

At the gui layer, we translate the selection variant into the actual
selection text and map it to the mux Pattern enum.

When taking the selection text, we restrict it to just the first line.

refs: https://github.com/wez/wezterm/issues/1912
2022-05-21 07:24:50 -07:00
Wez Furlong
e8c3de9c16 copy/search mode: change scope of saved search to be per-tab
refs: https://github.com/wez/wezterm/issues/1912
2022-05-21 06:45:26 -07:00
Wez Furlong
c04d831ee5 add cell_width config to scale cell_width
This works similarly to line_height

refs: #1979
2022-05-21 06:10:03 -07:00
Wez Furlong
94039c473b dynamic: allow defaulting to None for enum struct fields
refs: https://github.com/wez/wezterm/issues/1993#issuecomment-1133283042

```
DISPLAY=:0 ./target/debug/wezterm -n --config 'keys={{key="a", mods="NONE", action=wezterm.action{SwitchToWorkspace={ name = "default"}}}}'
```
2022-05-20 13:38:24 -07:00
Wez Furlong
b312479266 quickselect: allow multiline matches
Turn on multi-line mode by default, and improve the localpane
search function to collapse runs of trailing whitespace into
just a newline.

That allows:

```
./target/debug/wezterm -n --config 'quick_select_patterns={"foo$"}'
```

to match the first line from this, but not the second:

```
printf "foo\nfoobar\n"
```

and this to match both:

```
./target/debug/wezterm -n --config 'quick_select_patterns={"^foo"}'
```

refs: https://github.com/wez/wezterm/issues/2008
2022-05-20 09:47:08 -07:00
Wez Furlong
f72207e7f0 wayland: fix weirdness with recent mutter and display scaling
Mutter recently started to enforce a protocol error that enforces
the ordering of buffer updates and that is flushing out some
bugs in various places; here's a related issue that I stumbled
into when I set my scaling to 300% and got stuck:

https://gitlab.gnome.org/GNOME/mutter/-/issues/2083

What that means to us is that we have to be careful when updating
the buffer scaling properties on our EGL surface.

We don't actually own the underlying buffer or the underlying
buffer commits, so we have to be a little indirect: what
we do here is detach the EGL managed buffer when we notice
that scaling has changed, and that appears to satisfy the
compositor.

refs: https://github.com/wez/wezterm/issues/1727
2022-05-20 08:54:07 -07:00
Wez Furlong
1e61d1ea8b wayland: avoid noisy panic-within-panic on shutdown
Ensure that we eagerly clear the window map to avoid
drop-during-global-dtor related panic which confuses
the root cause of wayland protocol errors.
2022-05-20 07:54:00 -07:00
Wez Furlong
d6063e180a config: fix specifying numeric font weights
add helpers to Value coerce to different numeric types, and use
one of those in the FontWeight conversion.

refs: #2012
2022-05-20 06:33:12 -07:00
Wez Furlong
55767c69b1 quickselect: avoid jumping to bottom of viewport when activated 2022-05-20 06:16:31 -07:00
Wez Furlong
39bb8b3f39 mux: match workspace to local window when syncing panes
The logic that figures out whether/how to map remote windows
to the potential local window needs to account for the workspaces
on any given local/remote pair.

In particular, if we are called with a primary window id that
has say "default" as its workspace, we mustn't decide to place
remote tabs from a window whose workspace is not "default"
into that local window, or else we can end up in a weird
state where we have 3 workspaces on the remote, but have
accidentally folded one of them into the `default` workspace
and thus end up thinking that we have one workspace with two
windows and one other workspace, instead of the intended
3 windows each with a distinct workspace.

refs: https://github.com/wez/wezterm/issues/1978
2022-05-19 22:45:34 -07:00
Wez Furlong
c8c3b8378a ssh: avoid busy loop when all channels are closed on the session
We need to notice when all of the streams associated with a channel are
closed and remove the channel from the set that we're polling in the
main loop, to avoid continually polling the closed descriptors.

Additionally, if the Session has been dropped, we know that we cannot
be asked to create any new channels, so if there are no more channels
then we can and should exit that dispatch loop and allow the resources
to be cleaned up.

refs: https://github.com/wez/wezterm/issues/1993#issuecomment-1130539934
2022-05-19 21:02:06 -07:00
Ryohsukay
bc7c838cb7 fix typo
fix typo of Fedora version on the table
2022-05-19 18:02:46 -07:00
Wez Furlong
07128bd0de fixup win32 build 2022-05-19 09:23:32 -07:00
gitetsu
a7ad88c758 docs: fix typo 2022-05-19 09:21:37 -07:00
Wez Furlong
0e0bac2576 deps: prune some unused deps 2022-05-19 06:48:09 -07:00
Wez Furlong
2f14d640e8 config: split out lua functions into their own crates
This shaves off some build time and allows more parallism in the build.
2022-05-19 06:48:09 -07:00
Wez Furlong
42a7c1d481 dynamic: improve error messaging 2022-05-18 13:39:51 -07:00
Wez Furlong
c7387490a6 dynamic: add some doc comments 2022-05-18 09:54:02 -07:00
Wez Furlong
4fac2e8dc9 tidy up handling of index colors
IndexedMap was a temporary measure while I was hacking through the
dynamic crate stuff; we don't need it any more.
2022-05-18 09:35:32 -07:00
Wez Furlong
0b61d41f8f remove serde from bidi 2022-05-18 09:25:41 -07:00
Wez Furlong
92eea8e064 restore pretty printing lua values in repl
This time with more correctly working cycle detection
2022-05-18 07:47:39 -07:00
Wez Furlong
55e7d845e9 Add cycle detection when converting lua values to dynamic 2022-05-18 07:47:39 -07:00
Wez Furlong
862dbc604a cut more things over to dynamic 2022-05-18 07:47:39 -07:00
Wez Furlong
f587cac145 config: cut over to wezterm-dynamic
Avoid using serde for mapping between Lua and Rust for the `Config`
struct.

This improves the build speed of the config crate by 2x; it goes down
from 30 seconds to 9 seconds on my 5950x.
2022-05-18 07:47:39 -07:00
Wez Furlong
24c6830345 add wezterm-dynamic crate 2022-05-18 07:47:39 -07:00
kumattau
9b5c887874 Fix text cursor position when using multiple panes 2022-05-17 18:45:46 -07:00
Wez Furlong
53b9a68a9c docs: changelog for #2001 2022-05-17 07:43:53 -07:00
aznhe21
28466d517d Fix IME candidate window position 2022-05-17 07:40:55 -07:00
Funami580
4b302e8f57 rectangular selection: fix selection
fixes:
* beginning the selection with the top right or bottom left corner
* beginning the selection with the bottom right corner and only select a single line
2022-05-16 19:43:30 -07:00
Funami580
9600d52cd8 rectangular selection: add option to select with Alt+Shift 2022-05-16 19:43:30 -07:00
Wez Furlong
e927ecfd46 docs: changelog for https://github.com/wez/wezterm/issues/1385
refs: https://github.com/wez/wezterm/pull/1994
2022-05-16 14:20:40 -07:00
Funami580
cbd13c5e2a wayland: clipboard: fix pasting if active surface id was not set
refs: #1385
2022-05-16 14:18:28 -07:00
kumattau
bf0f502823 Fix compile error by using i686-pc-windows-msvc 2022-05-16 14:17:38 -07:00
Wez Furlong
0203c06215 docs: changelog for https://github.com/wez/wezterm/pull/1997 2022-05-16 14:16:45 -07:00
Funami580
55c5bcb6ae Make DecreaseFontSize the inverse of IncreaseFontSize
Otherwise increasing the font size and then decreasing it again
will not return to the original font size.
2022-05-16 14:09:48 -07:00
Wez Furlong
3800710ead cargo update 2022-05-15 19:44:27 -07:00
Wez Furlong
b833ee73b3 mux: don't kill panes when the domain is detached!
refs: #1993
2022-05-15 17:02:24 -07:00
Wez Furlong
64b6e63fcb docs: changelog for #1990 #1986 2022-05-14 17:59:33 -07:00
5225225
9b39d69927 Avoid index OOB when parsing ITermFileData 2022-05-14 17:50:19 -07:00
Funami580
2c84ddf4ba get-deps: add artix distribution 2022-05-14 17:49:22 -07:00
Wez Furlong
770ccbae66 ci: separate out the fuzzer to a separate step 2022-05-14 09:31:44 -07:00
Wez Furlong
b05d33e8a1 docs: clarify why the short name of LocalProcessInfo is not preferred 2022-05-14 09:29:30 -07:00
Wez Furlong
46ca0679b1 add pane:get_foreground_process_info()
Returns all known information about the foreground process in the pane.

refs: #1987
2022-05-14 09:14:35 -07:00
Wez Furlong
a22942aa13 fixup a couple more cases found by fuzzing
Also ensure the rust backtrace is printed by the fuzzer
for some reason, cargo-fuzz doesn't do this automatically, which limits
its out-of-the-box utility.

refs: https://github.com/wez/wezterm/pull/1986
2022-05-14 08:46:37 -07:00
Wez Furlong
1300f801ed CI: speculatively run the fuzzer for termwiz 2022-05-14 08:27:52 -07:00