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

Zooming and splitting a pane adds trailing spaces to pane contents #1013

Closed
mathstuf opened this issue Jul 21, 2017 · 8 comments
Closed

Zooming and splitting a pane adds trailing spaces to pane contents #1013

mathstuf opened this issue Jul 21, 2017 · 8 comments

Comments

@mathstuf
Copy link
Contributor

On Fedora 25 using tmux version e725b96, I'm seeing this behavior (without any config file):

  • Run echo foo
  • Split the window: tmux split-window -h -d
  • Zoom the first pane: tmux resize-pane -Z
  • Run echo foo
  • Select the output of the pane
  • Paste into an editor

The first echo foo and its output will have trailing space in it while the second will not.

$TERM inside: screen-256color
$TERM outside: rxvt-unicode-256color

Logs:
tmux-client-20083.txt
tmux-out-20085.txt
tmux-server-20085.txt

Will try to bisect later today. My reflog says it appeared between d149752 and fbbf5a1 for anyone who wants to do it before I get around to it.

@nicm
Copy link
Member

nicm commented Jul 21, 2017

When you copy with copy mode, right?

@mathstuf
Copy link
Contributor Author

With the mouse, sorry.

@mathstuf
Copy link
Contributor Author

Copy mode is fine.

@nicm
Copy link
Member

nicm commented Jul 21, 2017

Well, if spaces happened to be the best way to clear here you would be on your own, but it does look a bit odd:

1500643722.981805 /dev/pts/11: \033[1K
1500643722.981808 /dev/pts/11: \r
1500643722.981814 /dev/pts/11: foo

There is no point in clearing to the end of the line with spaces after "foo" when we just cleared it with ED1...

And I'm not sure where these spaces have come from, because there is no evidence the line has ever been that length. Maybe rewrap expanded it for some reason.

@nicm
Copy link
Member

nicm commented Jul 21, 2017

Does this help? x.diff.txt

@mathstuf
Copy link
Contributor Author

Yep, that works great. Thanks!

@nicm
Copy link
Member

nicm commented Jul 21, 2017

OK applied, thanks. If you have a nondefault bg colour you will still get trailing spaces but TBH unless you are using copy mode it will always be best effort.

@nicm nicm closed this as completed Jul 21, 2017
@lock
Copy link

lock bot commented Feb 16, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants