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

QuickSelect won't follow line wrap in tmux sessions #4083

Closed
walkert opened this issue Aug 1, 2023 · 5 comments
Closed

QuickSelect won't follow line wrap in tmux sessions #4083

walkert opened this issue Aug 1, 2023 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@walkert
Copy link

walkert commented Aug 1, 2023

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

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230731-231025-ca9cf230

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

I'm in a tmux session with a very long URL displayed on the screen. It is visually wrapped to the next line. If I pull up Quick Select with Ctrl-Shift-Space, only the first line is captured. If I exit tmux and attempt the same with a wrapped URL, the entire URL is selected. An example of what I mean below:

In a normal session it looks like this:

|[a]https://someverylong/url/is/listedh|
|[a]ere/index.html                     |

So with the above, in tmux once I copy the URL I get https://someverylong/url/is/listedh vs a regular session which gets https://someverylong/url/is/listedhere/index.html.

In tmux only the first line is selected (note the prefix only appears on the top line):
Screenshot 2023-08-01 at 20 10 24
In a normal session it looks like this:
Screenshot 2023-08-01 at 20 10 48

To Reproduce

Open terminal. Echo long URL to the screen such as https://github.com/wez/wezterm/issues/new?assignees=&labels=bug&projects=&template=bug.yml. Shrink the screen enough that the line is wrapped. Enter Quick Select mode. Do this within tmux and from a non-tmux shell.

Configuration

no config

Expected Behavior

I'd like the behaviour in a tmux session to be the same as outside.

Logs

I wasn't able to find any relevant logs when using Quick Select.

Anything else?

No response

@walkert walkert added the bug Something isn't working label Aug 1, 2023
@wez wez added the wontfix This will not be worked on label Aug 1, 2023
@wez
Copy link
Owner

wez commented Aug 1, 2023

Matching works on logical lines. I'm not going to support matching this kind of output. You can use wezterm's native panes instead.

@wez wez closed this as completed Aug 1, 2023
@walkert
Copy link
Author

walkert commented Aug 1, 2023

Just so I'm clear, this is an issue of not supporting tmux fully in the terminal since you're already matching these lines in a regular window?

@wez
Copy link
Owner

wez commented Aug 1, 2023

functions in wezterm that match text using regular expressions operate on logical lines, matching contiguous text.

Supporting matching arbitrary ranges delimited by arbitrary separator characters requires some engineering effort to guess at when a pane is a pane and is not some other kind of ascii art on the screen (and will thus be a source of bugs when it inevitably doesn't work how someone expects) and is also costly at runtime. I won't be supporting that at that layer.

If/when:

is done, then it will likely just happen work with no additional effort, because it will work "natively" in the Pane abstraction.

If you're using tmux and want to use quickselect style functionality, you should consider https://github.com/fcsonline/tmux-thumbs which was the inspiration for this feature in wezterm.

@walkert
Copy link
Author

walkert commented Aug 3, 2023

Thanks for the detailed reply!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 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 Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants