1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00
Commit Graph

6294 Commits

Author SHA1 Message Date
Wez Furlong
ab2c368a3c docs: update default assignments 2022-09-01 08:41:36 -07:00
Wez Furlong
1aea0e0dfe update shell completion info 2022-09-01 08:39:11 -07:00
Wez Furlong
16bf00c63c charselect: add explicit recent category, show category in UI
The default behavior for charselect is to show the recent category
if you have previously used it, otherwise, show the default emotion
category.

refs: https://github.com/wez/wezterm/issues/2163
2022-09-01 07:19:17 -07:00
Wez Furlong
a599567423 cargo fmt 2022-09-01 06:54:27 -07:00
Wez Furlong
44ae864709 pty: fix build on windows 2022-09-01 06:02:16 -07:00
Wez Furlong
c0a841eecb pty: set SHELL to the shell we selected
refs: #2469
2022-09-01 05:37:51 -07:00
Wez Furlong
9082c79b34 pty: actually return the shell we found
this was masked for me because my dotfiles have a special case
to run zsh when launching sh as a login shell. doh!

refs: https://github.com/wez/wezterm/issues/2469
2022-09-01 05:24:05 -07:00
Wez Furlong
7670c4f0ae char selector: track recently selected emoji and use frecency to show it
refs: https://github.com/wez/wezterm/issues/2163
2022-08-31 22:56:58 -07:00
Wez Furlong
699d720a71 ssh: add trace logging when we send a signal 2022-08-31 20:40:06 -07:00
Wez Furlong
9721900b16 ssh: reduce some redundant logging around AcceptEnv
just show it once at warn level and drop it to debug after that.
2022-08-31 20:40:06 -07:00
Wez Furlong
ad9490ee8f posix: prefer to resolve shell via the password database
I've had a couple of people report issues like
https://github.com/wez/wezterm/issues/2378 recently, and we can avoid
this class of problem by unsetting SHELL at proces startup, so that's
what we do.
2022-08-31 20:40:06 -07:00
Wez Furlong
ed731a0d8d Add CharSelect modal for emoji/nerdfont/unicode input
CTRL-SHIFT-U is a new default key assignment for this new modal.
It opens up a fuzzy searchable browser that defaults to showing
emoji/emoticons.  The category can by cycled through the suggested
emoji categories using CTRL-r.  Unlike the system emoji palette,
wezterm includes a category for nerdfont symbols, and another
that is a list of all unicode codepoint names, so you should be
able to browse for pretty much any codepoint you can think of.

The modal also allows fuzzy searching based on:

* The official unicode name
* The github shortcode
* codepoint value in hex

so if you know the codepoint value but not the name, you can
still find a way to input what you're looking for.

Pressing Enter will copy the selected item to the clipboard
send it to the active pane, and cancel the modal. You can therefore
repeat the insert by simply pasting.

I plan to add frecency to this in a later commit: that way the
frequently/recently used selections will show in a category of
their own and make it easier to re-input them.

refs: https://github.com/wez/wezterm/issues/2163
2022-08-31 18:15:28 -07:00
Wez Furlong
ba88bda9eb new color scheme: poimandres
refs: https://github.com/olivercederborg/poimandres-wezterm/issues/2
2022-08-30 18:02:14 -07:00
Wez Furlong
97eaa58112 codec: bump version
Something in the ABI changed recently, so we need to bump this
avoid weird repeated errors with the mux client
2022-08-30 09:43:32 -07:00
Wez Furlong
ccc1a2beff add pane_id and active state to render cache key
refs: https://github.com/wez/wezterm/issues/2467
2022-08-30 08:18:13 -07:00
Wez Furlong
fdb7c557e9 ssh: close stdout, stderr bridges if child is done and there is no data
Inspecting the wezterm process with `lsof -p`, before and after closing
a pane with `CloseCurrentPane`, the same number of unix domain sockets
are open, which is bad.

This commit tries a bit harder to clean things up: if we got a process
exit condition we now remember that we had it, and, while processing
the IO for that channel, if we have no data for stdout or stderr
(respectively) and the channel exited, we close our end of the
socketpair to encourage EOF to be detected on the other end.

This is sufficient to restore the number of open files to the same
number wezterm had opened prior to opening that pane.

@chipsenkbeil: this might possibly be a factor in the issue you
reported, but I haven't had time to really dig into that yet!

refs: https://github.com/wez/wezterm/issues/2466
refs: https://github.com/wez/wezterm/issues/2456
2022-08-30 08:00:49 -07:00
Wez Furlong
60c5eb1f51 add cursor shape/visibility to quad cache key
otherwise strangeness can occur in vim when vim hides the cursor
as part of partially updating the screen.
2022-08-30 07:28:13 -07:00
Wez Furlong
0974c631e2 mux: gracefully handle socketpair failure
Avoids panicking when the process runs out of resources, but doesn't
address the underlying resource issue.

refs: https://github.com/wez/wezterm/issues/2466
2022-08-30 07:11:30 -07:00
Wez Furlong
3fab3aaf21 mux: refactor emit_output_for_pane and use it for exit_behavior
The logic in the exit_behavior case was a bit smarter than that
in emit_output_for_pane, so adopt the former in the latter, then
use the latter for the former!
2022-08-30 07:10:32 -07:00
Wez Furlong
0d85d05442 update conpty to v1.14.2281.0 release 2022-08-29 08:32:08 -07:00
Wez Furlong
b9d0843b71 deps: tiny-skia 0.7 -> 0.8 2022-08-28 20:50:27 -07:00
Wez Furlong
0f0593f475 cargo update 2022-08-28 20:48:33 -07:00
Wez Furlong
9732f9ee2b Adjust render caching; switch to LFU caches from LRU 2022-08-28 10:28:26 -07:00
Wez Furlong
1398c0d4b0 add user-var-changed event 2022-08-27 17:22:21 -07:00
Wez Furlong
ca8d3f3fee improve error message in case wezterm-gui cannot be run
refs: https://github.com/wez/wezterm/issues/2457
2022-08-27 15:58:14 -07:00
Wez Furlong
3c7b75a4f3 fixup invalidation of blinking cursor, and on focus change 2022-08-27 12:14:10 -07:00
Wez Furlong
d38caf4088 cargo fmt 2022-08-27 10:32:01 -07:00
Wez Furlong
bf39e90676 track fps and recent frame duration for diagnostic purposes 2022-08-27 09:10:26 -07:00
Wez Furlong
5d250bce36 invalidate shape cache when reverse video mode changes 2022-08-27 08:47:22 -07:00
Wez Furlong
28b4a0d16b Add some comments about new Pane methods and helpers 2022-08-27 08:07:26 -07:00
Wez Furlong
cb9fe1a676 flesh out some todos with new pane trait methods
Tidy some things up to avoid some dead code and redundant impls.
Make it easier to select whether you want to implement the new
methods in terms of the old, or the old methods in terms of
the new in a given pane impl.
2022-08-27 07:58:17 -07:00
Wez Furlong
d492eef700 implement new pane trait methods for copy and quickselect overlays 2022-08-27 06:19:12 -07:00
Wez Furlong
f03dc68f96 move shape & quad caching to hang off Line appdata
Remove the faulty cache key stuff and hang references to the cached
data directly off the underlying Line.  That makes the association
between the the Line and the data O(1) plus some basic cache
invalidation checks.

Adjust the shape cache portion of this to use the same ID for the
shape, so that things that invalidate just the quads (such as cursor
movement when not composing, and selection) only need to recompute
the quads without re-shaping.
2022-08-26 21:49:33 -07:00
Wez Furlong
b7b1e4020a revise Pane line related funcs
Adds Pane::for_each_logical_line_in_stable_range_mut and
Pane::with_lines_mut which allow iterating mutably over lines.

The idea is that this will allow the renderer to directly cache
data in the Line via its appdata without having to build cumbersome
external caching logic and managing cache keys.

This commit just swaps the implementation around for localpane
and sanity checks that the renderer functions.

Various overlays and the mux client don't properly implement these
yet and current warn at compile time and panic at runtime.

To follow is the logic to cache the data and make sure that it
works the way that I think before converting the other Pane
implementations.
2022-08-26 08:05:06 -07:00
Wez Furlong
66761ed014 termwiz: use interior mutability for Line::set_appdata 2022-08-25 06:19:56 -07:00
Wez Furlong
6962d6805a cargo fmt 2022-08-24 23:04:15 -07:00
Wez Furlong
c4ea703d4b disable some of the recent caching stuff
The cache key isn't quite right, leading to some artifacts
in some cases.

I have a cunning plan, but it will take me a bit to wrap
it up, so in the meantime, disable these caches.

refs: https://github.com/wez/wezterm/issues/2455
2022-08-24 22:57:57 -07:00
Wez Furlong
5e993c581a termwiz: remove reverse video attribute from Line
It didn't really belong there; it was added as a bit of a hack
to propagate screen reverse video mode.

Move that to the RenderableDims struct and remove the related
bits from Line
2022-08-24 22:43:47 -07:00
Wez Furlong
f59e1d5fff mux: remove stale portion of comment from Pane::get_lines
we haven't had dirty bits in a long while
2022-08-24 20:19:15 -07:00
Wez Furlong
4963187eaf termwiz: associate appdata with a Line
I plan to use this to hang cached shaper data with a line
and avoid expensive hashing to resolve it.
2022-08-24 20:11:27 -07:00
Wez Furlong
0fe8bba147 fix copymode and quickselect overlays
the new caching broke these because they play dirty tricks by
aliasing the delegated pane id.

Skip caching for those by reporting the pane_id as None
2022-08-24 08:07:16 -07:00
Wez Furlong
ad7199c1cc trim down lru cache sizes
refs: https://github.com/wez/wezterm/issues/2453
2022-08-23 22:34:26 -07:00
Wez Furlong
3b4e859956 allow cursor_fg = "none" to use text fg color
Similar to selection_fg, setting the cursor_fg to transparent ("none")
will use the foreground color of the text behind the cursor.

refs: https://github.com/wez/wezterm/issues/1835
2022-08-23 19:54:19 -07:00
Wez Furlong
0141d340f3 gui: cache get_lines_with_hyperlinks_applied
If the pane is unchanged and we're at the same viewport, cache
the values from the last call.
2022-08-23 17:39:56 -07:00
Wez Furlong
e05b3581b8 optimize Pane::get_lines_with_hyperlinks_applied for empty rules case
It's ~30x cheaper to just get the underlying lines when there
are no hyperlink rules defined (3us vs 112us)
2022-08-23 17:20:46 -07:00
Wez Furlong
03246fba23 gui: factor out background rect calc
avoid some copypasta
2022-08-23 17:16:04 -07:00
Wez Furlong
9029b3bca6 fix blinking text 2022-08-23 14:43:35 -07:00
Wez Furlong
65d350be36 fixup retro tab bar
I broke this with the performance changes I pushed earlier today.

Poke a hole in caching for it as well, as it doesn't use the seqno
to track changes like the rest of the Line based data.

cc: @DeadlySquad13
2022-08-23 12:30:45 -07:00
Wez Furlong
4edc9c5d9f macos: make us run again on Mojave
refs: https://github.com/wez/wezterm/issues/2451
2022-08-23 11:48:59 -07:00
Wez Furlong
f4fa87eca1 docs: mention CPU utilization improvements in changelog 2022-08-23 10:41:36 -07:00