mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Merge pull request #1154 from vancluever/vancluever-macos-middle-click-paste
macos: middle click always pastes from clipboard
This commit is contained in:
@ -2080,7 +2080,11 @@ pub fn mouseButtonCallback(
|
|||||||
|
|
||||||
// Middle-click pastes from our selection clipboard
|
// Middle-click pastes from our selection clipboard
|
||||||
if (button == .middle and action == .press) {
|
if (button == .middle and action == .press) {
|
||||||
if (self.config.copy_on_select != .false) {
|
if (comptime builtin.target.isDarwin()) {
|
||||||
|
// Fast-path for MacOS - always paste from clipboard on
|
||||||
|
// middle-click.
|
||||||
|
try self.startClipboardRequest(.standard, .{ .paste = {} });
|
||||||
|
} else if (self.config.copy_on_select != .false) {
|
||||||
const clipboard: apprt.Clipboard = switch (self.config.copy_on_select) {
|
const clipboard: apprt.Clipboard = switch (self.config.copy_on_select) {
|
||||||
.true => .selection,
|
.true => .selection,
|
||||||
.clipboard => .standard,
|
.clipboard => .standard,
|
||||||
|
Reference in New Issue
Block a user