fa7a007a9f1841a8fcc257e32dd8f85c63bfebfe
A while back I moved the clipboard related processing mostly out of the term processing code, but since I mostly use the keyboard for pasting, I'd overlooked the middle mouse button paste flow. This is problematic because fetching the clipboard requires a degree of inter process communication and needs the event loop to be pumped. Since the terminal callbacks are dispatched from an event loop callback, attempting to block on the clipboard future causes a deadlock. This commit resolves that issue by anticipating that we'll need the clipboard contents for the majority of middle mouse button clicks and scheduling a fetch and cache ahead of passing that event down to the terminal layer. Why don't we simply use the same technique as the Paste key assignment? If the terminal is currently using SGR mouse tracking mode then the application on the other end of the pty will want the raw button press. Our layering doesn't allow for passing up the concept of whether a middle button does paste or sends the raw event. tricksy! Refs: https://github.com/wez/wezterm/issues/87
Wez's Terminal
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
User facing home page at: https://wezfurlong.org/wezterm/
Screenshot of wezterm on macOS, running vim
Installation
https://wezfurlong.org/wezterm/installation.html
Getting help
This is a spare time project, so please bear with me. There are two channels for support:
- You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one: https://github.com/wez/wezterm/issues
- There is a gitter room for (potentially!) real time discussions: https://gitter.im/wezterm/Lobby
The gitter room is probably better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.
Description
The agentic terminal: a WezTerm fork with LLeMbas built in
316 MiB
0 Stars
2 Watchers
0 Forks
Languages
Rust
97.7%
Python
1%
Shell
0.9%
Nix
0.2%
