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

5434 Commits

Author SHA1 Message Date
Wez Furlong
bbead38f82 gui: reduce log level for Ding log line
Since we have working visual and audible bells, we can
avoid polluting the logs with this.

refs: #1844
2022-04-09 06:37:24 -07:00
Wez Furlong
394c62d56c term: don't warn when we receive ControlCode::Null
refs: #1844
2022-04-09 06:36:01 -07:00
Wez Furlong
0f6ee20b28 pty: ExitStatus now understands signals and impl Display
Improves the fidelity of the information in ExitStatus and shows it
in the wezterm exit_behavior output to clarify the status.
2022-04-09 06:15:54 -07:00
Wez Furlong
317bfeef41 docs: remove bit about cursor alpha; it's not complete 2022-04-08 18:00:43 -07:00
Wez Furlong
7885b9269e docs: update for 20220408-101518-b908e2dd release 2022-04-08 17:44:41 -07:00
Wez Furlong
58f8ace8b5 docs: changelog for https://github.com/wez/wezterm/issues/1841 2022-04-08 17:39:34 -07:00
Wez Furlong
b908e2dd8c mux: fix update issue
The heart of the issue here was due to the window-reuse logic that
tries to reuse a GUI window that is no longer associated with a mux
window.

Each GUI window subscribes to the mux for mux events, but it filters
according to is understanding of the mux_window_id that it is associated
with.

The GUI frontend maintains an mapping of GUI and mux window so that it
knows when to reuse a GUI window and when to close it.

When connecting to a remote mux, wezterm spawns a temporary connection
progress window.  Once connected, workspace reconiliation is triggered
and decides that this window can be used for something else.

As part of workspace reconciliation, this mapping can be adjusted and
the frontend will notify a GUI window that its mux window has changed.

However, that updated mux window was not visible to the mux notification
subscription so the effect was that a variety of notifications were
effectively ignored, including updates from a remote mux when the output
was changed.

To make matters worse, the workspace reconciliation could "double-tap"
window creation and create excess windows only to later realize they
weren't needed and close them out again.

This commit addresses both of these concerns.

refs: #1841
refs: #1814
2022-04-08 10:15:18 -07:00
Wez Furlong
e8ad5f2b56 docs: changelog for https://github.com/wez/wezterm/pull/1840 2022-04-08 07:51:57 -07:00
David Rios
44a26c78f2 wayland: improve touchpad scroll precision
- Save the remainder of the scroll delta to be used on the next event
when it doesn't meet the activation threshold

refs: https://github.com/wez/wezterm/issues/1827
2022-04-08 07:50:47 -07:00
Wez Furlong
10dacf3d3b ignore errors when writing to logs
For errors like eg: ENOSPC we shouldn't terminate the program when
logging output.

refs: https://github.com/wez/wezterm/issues/1839
2022-04-08 07:32:03 -07:00
Wez Furlong
5914a91490 palette now stores alpha for all color values
We're now capable of remembering an alpha value for everything
in the palette and the main window theme, but not the tab bar theme.

Whether the alpha is correctly respected at render time is a different
story!

refs: #1835
2022-04-08 07:08:33 -07:00
Wez Furlong
d356b72ca9 cursor_fg, cursor_bg, cursor_border now accept alpha values
refs: https://github.com/wez/wezterm/issues/1835
2022-04-07 21:55:28 -07:00
Wez Furlong
d8cfdae27b avoid ping-ponging focus updates with multiple windows
The bug here was that each paint call in a window would update
the focus state of its panes to reflect the one that had focus.

However, it didn't account for the actual window focus; it would
just assume that it was focused.

The result was that the perceived focus would alternate between each of
the windows in the wezterm process, and if you were running an
application that had enabled focus tracking, those events could cause a
repaint and drive up the CPU utilization.

This commit addresses that by gating the focus update to only occur
when we have the focus, and for extra safety, avoid generating focus
events at the terminal layer if the new state matches the current state.

refs: https://github.com/wez/wezterm/issues/1838
2022-04-07 21:43:05 -07:00
Wez Furlong
a2da7efbf7 remove send_composed_key_when_alt_is_pressed option
refs: https://github.com/wez/wezterm/issues/1826
2022-04-07 21:21:14 -07:00
Wez Furlong
a7cdd46720 logging: use our own custom logger
I wanted to use the Target::Pipe feature of env_logger so that we could
log to a log file as well as stderr, but it just doesn't work
(https://github.com/env-logger-rs/env_logger/issues/208).

Since we were already composing over the top of the logger in order
to capture data for our ringlog, this commit embraces that and makes
our logger responsible for both stderr and log file printing.

Thankfully, we can use the filter parsing code from env_logger to
avoid having to get too crazy with this.

Logs are stored in the runtime directory and look something like:

/run/user/1000/wezterm/wezterm-gui-log-596324.txt

Logs are collected on all platforms.

There isn't currently a thing to clean up logs.
2022-04-07 09:51:00 -07:00
Wez Furlong
b35e3b2aad deps: remove pretty_env_loggger
Go directly to the underlying env_logger crate, as pretty_env_logger
hasn't been updated in some time, and I'd like to be able to redirect
the log output to a file more directly, and that feature is in a newer
version of the env logger than pretty_env_logger was pulling in.
2022-04-07 08:24:07 -07:00
Wez Furlong
1bb31d78ab termwiz: fix code formatting
doh!
2022-04-07 07:39:52 -07:00
Wez Furlong
c9c6d869f4 vtparse: bump version for UB fix 2022-04-07 07:28:21 -07:00
Wez Furlong
d0d23d6c46 termwiz: prep for crates.io 2022-04-07 07:27:54 -07:00
Wez Furlong
f9382d067e prep bidi for crates.io 2022-04-07 07:24:57 -07:00
Wez Furlong
e92db03ec8 termwiz: add comment about bracketed paste offset 2022-04-07 07:16:13 -07:00
Thomas Linford
59425237bc termwiz: fix partial bracketed paste panic 2022-04-07 07:16:13 -07:00
Thomas Linford
28baf56a6e termwiz: add test for partial bracketed paste 2022-04-07 07:16:13 -07:00
Wez Furlong
c96396bd2f input: normalize_ctrl shouldn't turn CTRL-Tab into Ctrl-i
I'm not sure that we strictly want/need this normalization function
any more, but I'm hesitant to blanket remove it without having time
to really investigate further.

cc: @CIAvash
2022-04-07 06:47:15 -07:00
Wez Furlong
f34d3a872e keys: fix always parsing key="F" as physical key
When considering "F" we'd try to parse it as "F<NUMBER>" and fail,
so fall back to producing `Physical(F)` instead.

Since this was in the context of CMD-F in the default keymap code,
we'd then generate ctrl-F as an equivalent when considering the
ctrl-shift case.

cc: @CIAvash
2022-04-07 06:39:06 -07:00
Wez Furlong
b70ca55bdb mux: suppress error messages when client disconnects 2022-04-06 22:23:42 -07:00
Wez Furlong
ad91e37768 Secondary DA response -> vt220, version 277
This persuades vim to set ttymouse=sgr by default.
We're carefully sitting below 279 which triggers
some queries for things that we don't respond to yet.

refs: https://github.com/wez/wezterm/issues/1825
2022-04-06 20:45:37 -07:00
Wez Furlong
81a6089289 Use PaneId type in MouseCapture::TerminalPane variant 2022-04-06 20:00:00 -07:00
David Rios
4c304233f5 Extend mouse capture concept to individual panes 2022-04-06 20:00:00 -07:00
Wez Furlong
255e059dab and this time with feeling!
I think this really will sort out the win32 build.
If not, I'll have to walk over to my windows machine and turn it on. :-p
2022-04-06 19:58:45 -07:00
Wez Furlong
9e1a6c5a75 maybe fix win32 build for real
nth time's the charm!
2022-04-06 19:44:38 -07:00
Wez Furlong
5eb3b122a6 really fix win32 build :-p
I'm not actually on win32 so this is speculative!
2022-04-06 18:49:48 -07:00
Wez Furlong
6e07fc5b9a fix win32 build
6cad4c35e9 calls get_shell, but
that isn't available on windows... it is now.
2022-04-06 18:42:56 -07:00
Wez Furlong
0cfdf0999c macos: send_composed_key_when_X_alt_is_pressed now ignores other mods
For reasons that I cannot remember, I made
`send_composed_key_when_left_alt_is_pressed` and
`send_composed_key_when_right_alt_is_pressed` only take effect if only
the ALT modifiers were pressed.  If SHIFT or CTRL were pressed, then
the purpose of `send_composed_key_when_left_alt_is_pressed` was
bypassed.

This commit scopes this back to the alt mods - other kinds of mods
don't affect this functionality any more.

refs: https://github.com/wez/wezterm/issues/1826
2022-04-06 18:26:16 -07:00
Wez Furlong
6cad4c35e9 Improve exit_behavior messaging some more 2022-04-06 17:53:46 -07:00
Wez Furlong
eefe4bd201 keys: improve key config parsing
The recent switch to DeferredKeyCode introduced a bit of ambiguity
when parsing certain keys.

One issue was with the map that was used for some parsing didn't have
consistent/distinct entries for physical vs. mapped.

Another issue is that the key resolution for the simple case where
a key had the same physical and mapped representations would always
return the mapped one even when physical mode was set as a preference.

This commit kills the ambiguous map in favor of an string conversion
method on KeyCode.

It's possible that this will help with https://github.com/wez/wezterm/issues/1826
a little, but I started looking at this because there were a couple of
comments about Alt-Enter and some numpad keys no longer working in the
Element channel.
2022-04-06 09:50:08 -07:00
Wez Furlong
1b0f5cf256 fonts: treat "charcell" spacing as monospace
Some versions of fontconfig classify some fonts as having charcell
spacing.  We need to consider those as monospace as well.

refs: https://github.com/wez/wezterm/issues/1820
2022-04-06 08:11:34 -07:00
Wez Furlong
a0ce1f9526 env: unset WINDOWID
I can't think of a reason for this to ever want to be passed down
from above, so remove it.
2022-04-06 07:48:10 -07:00
Wez Furlong
1908d35d03 Improve exit_behavior messaging
refs: https://github.com/wez/wezterm/issues/1791#issuecomment-1090059541
2022-04-06 07:43:12 -07:00
Wez Furlong
a1b573c3c5 fix parsing raw: keycodes
refs: #1824
2022-04-06 07:01:10 -07:00
Wez Furlong
16e5a3604d ls-fonts: show pixel_sizes for font-dirs and built-ins 2022-04-05 20:55:15 -07:00
Wez Furlong
11a19a589a fonts: remember bdfs with multiple sizes found in font_dirs
We were using a simple hashmap of name -> parsed file, but for
something like Terminus where there are ~10 files per weight
but for different pixel sizes, we'd end up forgetting files
beyond the first.

This commit tracks the full list in the font db.

related to #1820 in the sense that I needed this to confirm that
we do handle BDFs, but it is not the issue reported there because
that was sourcing fonts via fontconfig on linux.
2022-04-05 20:46:28 -07:00
David Rios
33e0858f8d fix incorrect mouse position reporting for split panes
fixes #1822
2022-04-05 17:38:22 -07:00
Wez Furlong
8a0072add1 docs: clarify same domain for OSC 7 in cwd determination 2022-04-05 09:15:15 -07:00
Wez Furlong
b2ba7383b0 windows: procinfo: extra defensive coding around reading proc info
Might possibly help with #1699
2022-04-05 08:54:05 -07:00
Wez Furlong
27217992f2 docs: update colorschemes screenshots
I really want to replace these with simple html to avoid bloating
the repo too much over time.
2022-04-05 08:18:01 -07:00
Wez Furlong
713d9e0124 term: change default selection fg/bg to translucent purplish color
I think this looks less jarring than the yellowish selection color,
and the translucency looks nicer than changing the fg color completely
black as it did previously.
2022-04-05 07:47:32 -07:00
Wez Furlong
9ee2d0f6b2 clientpane: delay before re-sync
The fix for f478672fd8 regressed
the one for b398eaf656.

Compensate by adding a short delay.

refs: #1752
2022-04-05 07:29:57 -07:00
Wez Furlong
de615080b2 Restore window creation error logging
revert 4f59c17f19 as it didn't help
2022-04-05 07:17:07 -07:00
Wez Furlong
dc33a5b081 docs: clarify Menlo fi ligature changelog entry 2022-04-05 07:13:30 -07:00