Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace is lost during copy-paste if it's at the end of the terminal line #1635

Closed
nh2 opened this issue Feb 11, 2022 · 3 comments
Closed
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.

Comments

@nh2
Copy link

nh2 commented Feb 11, 2022

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

Linux X11

WezTerm version

20220101-133340-7edc5b5a

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

No, and I'll explain why below

Describe the bug

If I have a wrapped line like this (note, whitespace at the end of the first line, the string typed is aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa BBB):

niklas:~/ $ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa  
BBB

and I select it with the mouse, copy-pasting it into another wezterm instance with Shift+Ctrl+C, Shift+Ctrl+V, then the whitespace from the middle is lost:

niklas:~/ $ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaB
BB

The pasted string is now aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBB (2 spaces in the middle were removed).

Video:

wezterm-copy-paste-lost-whitespace.mp4

To Reproduce

No response

Configuration

local wezterm = require 'wezterm';

return {
  -- Enable the scrollbar.
  -- It will occupy the right window padding space.
  -- If right padding is set to 0 then it will be increased
  -- to a single cell width
  enable_scroll_bar = true,

  scrollback_lines = 1000000,

  -- https://wezfurlong.org/wezterm/config/appearance.html#defining-your-own-colors
  colors = {
    -- The color of the scrollbar "thumb"; the portion that represents the current viewport
    scrollbar_thumb = "#aaa",
  },

  font = wezterm.font("JetBrains Mono"),
  font_size = 11.0,

  -- Disable ligatures in most fonts, see https://wezfurlong.org/wezterm/config/font-shaping.html
  harfbuzz_features = {"calt=0", "clig=0", "liga=0"},

  use_fancy_tab_bar = false, -- I like the terminal-font style for tabs better
  hide_tab_bar_if_only_one_tab = true,

  exit_behavior = "Close", -- like VTE terminals

}

Expected Behavior

Copy-pasting preserves input exactly.

Logs

No response

Anything else?

No response

@nh2 nh2 added the bug Something isn't working label Feb 11, 2022
wez added a commit that referenced this issue Feb 12, 2022
@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Feb 12, 2022
@wez
Copy link
Owner

wez commented Feb 12, 2022

Thanks for the report; this is fixed now in main and should show up in a nightly building within the next hour!

@nh2
Copy link
Author

nh2 commented Feb 12, 2022

Awesome, thanks!

@wez wez closed this as completed Feb 12, 2022
@github-actions
Copy link

github-actions bot commented Feb 4, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.
Projects
None yet
Development

No branches or pull requests

2 participants