1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 11:17:15 +03:00
Commit Graph

5373 Commits

Author SHA1 Message Date
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
Wez Furlong
30bc258628 docs: fix typo in changelog 2022-04-05 07:12:40 -07:00
Wez Furlong
e3c143ea8a docs: tweak how Space is shown in the default-keys table 2022-04-05 07:03:09 -07:00
Wez Furlong
c62e2364dd docs: changelog for https://github.com/wez/wezterm/issues/1794
closes: https://github.com/wez/wezterm/issues/1794
2022-04-04 20:51:48 -07:00
Wez Furlong
520f1e994a docs: changelog for https://github.com/wez/wezterm/issues/1804
closes: https://github.com/wez/wezterm/issues/1804
2022-04-04 20:49:49 -07:00
Wez Furlong
526cc26b1e allow disabling aa for custom block glyphs
This is definitely in the band-aid category, but two issues have
mentioned the AA in custom block glyphs recently.

This commit adds an `anti_alias_custom_block_glyphs` option that can be
set to false to prevent the custom block glyphs from enabling AA.

I think a better long term fix would be some kind of hinting to avoid
the degenerate AA case, but when I made an enquiry about this class of
issue in tiny skia in the past, the author didn't want to diverge from
skia-compatible behavior, so I think we'd need to find (or build!) an
alternative rasterizer for these path instructions.

refs: https://github.com/wez/wezterm/issues/1753
refs: #1817
2022-04-04 20:39:30 -07:00
Wez Furlong
59a5b5ab12 gui: assume --always-new-process if --position is specified
To fix this correctly, the mux protocol would need to have some
special cases for talk to a gui server implementation, and we don't
have those today.

refs: #1794
2022-04-04 20:07:10 -07:00
Wez Furlong
24b2597183 ls-fonts: improve output for custom_block_glyphs
Print the correct text fragment, and clarify why wezterm
is drawing a glyph.

refs: #1817
2022-04-04 20:03:05 -07:00
Wez Furlong
327984d1d1 docs: add info about key tables. break key binding apart
The keys section was way too big; this splits it up into more
manageable pieces, adds a nice flow chart to show how key events
are processed and adds an example of using the new key tables feature.
2022-04-04 09:30:04 -07:00
Wez Furlong
53cae843c8 Clear key table stack on config reload 2022-04-04 09:30:04 -07:00
Wez Furlong
4f59c17f19 window: include debug repr of window creation errors
The glium IncompatibleOpenGl Display doesn't include any of the
useful context to explain what the issue was, so this commit
renders the error both in human friendly and Debug form to
see if we can understand more about what is happening.

refs: https://github.com/wez/wezterm/issues/1813
2022-04-04 07:06:27 -07:00
Wez Furlong
6c5e54c47e deps: unpin glium from git, use latest release
We were pinned on the revision where I had added dual source blending,
because I wanted that feature ahead of the crate being published.

Since then a couple of releases have been made so we can unpin.

On Windows 11, we had a report of glium complaining about the opengl
version. I can't find that error message string in the current version
of the code so it's possible that that situation has been resolved.

refs: https://github.com/wez/wezterm/issues/1813
2022-04-04 06:54:49 -07:00