wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.77k stars 795 forks source link

Select copy does not copy up to shift click select #1204

Closed shaozi closed 2 years ago

shaozi commented 3 years ago

What Operating System(s) are you seeing this problem on?

macOS

WezTerm version

20211004-231321-49d77138

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

When use mouse to select text to copy to clipboard, you highlight some text with mouse click-hold-drag-release, then move the mouse to a further location and Shift-click to select more text.

You can see all text are highlighted, but when you paste, you will find only the text selected in the first part is pasted, the other text selected with Shift-click is not copied.

To Reproduce

No response

Configuration

local wezterm = require 'wezterm';
return {
  font_size = 15,
  -- use_ime = true,
  enable_scroll_bar = true,
  window_padding = {
    left = 2,
    -- This will become the scrollbar width if you have enabled the scrollbar!
    right = 8,
    top = 4,
    bottom = 0,
  },
  color = {
    scrollbar_thumb = "white",
  },
  inactive_pane_hsb = {
    saturation = 0.9,
    brightness = 0.8,
  },
  launch_menu = {
    {
      label = "Bash",
      args = {"bash", "-l"},
    },
  },

  keys = {
    {
     key = "d", mods="CMD",
     action=wezterm.action{SplitHorizontal={domain="CurrentPaneDomain"}}
    },
    {
     key = "D", mods="CMD",
     action=wezterm.action{SplitVertical={domain="CurrentPaneDomain"}}
    },
    {
     key="w", mods="CMD",
     action=wezterm.action{CloseCurrentPane={confirm=true}}
    }
  }
}

Expected Behavior

all highlighted text should be automatically copied to clipboard

Logs

No response

Anything else?

No response

wez commented 2 years ago

This was really a timing issue with SHIFT being held down longer than the mouse button. I've added a default assignment that allows both shift-left-button-release and unmodified-left-button-release to perform the copy to clipboard This will show up in the nightly downloads within an hour!

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.