Shift Double-click in tmux select words from differnet panes #21664

Closed
opened 2026-01-31 07:51:18 +00:00 by claunia · 9 comments
Owner

Originally created by @SivanagBalla on GitHub (May 9, 2024).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.20.11215.0

Windows build number

10.0.22631

Other Software

Tmux in WSL with multiple panes

Steps to reproduce

Consider a tmux session with multiple panes as shown in below pic.
image

When i try to "shift double-click" on the word "siballa", Terminal also selects the pane delimiter line from other pane because it thinks its complete word.

Another example below where in which i tried to select the file permission string "lrwxrwxrw". It selected the "yankrink_hi" from the other pane

image

Expected Behavior

In tmux enviroment, Double-click should select words only from current pane

Actual Behavior

In tmux enviroment, Double-click should select words only from multiple panes.

This may not be bug but atleast there should be a option to prevent selection of words across multiple lines. I use tmux with multiple panes and encounter this issue often.

Originally created by @SivanagBalla on GitHub (May 9, 2024). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.20.11215.0 ### Windows build number 10.0.22631 ### Other Software Tmux in WSL with multiple panes ### Steps to reproduce Consider a tmux session with multiple panes as shown in below pic. ![image](https://github.com/microsoft/terminal/assets/19350704/73993e1c-7c8f-4858-99c3-9074b6baf462) When i try to "shift double-click" on the word "siballa", Terminal also selects the pane delimiter line from other pane because it thinks its complete word. Another example below where in which i tried to select the file permission string "lrwxrwxrw". It selected the "yankrink_hi" from the other pane ![image](https://github.com/microsoft/terminal/assets/19350704/bff4f34d-f5f1-4fea-b700-dd1be1df4a82) ### Expected Behavior In tmux enviroment, Double-click should select words only from current pane ### Actual Behavior In tmux enviroment, Double-click should select words only from multiple panes. This may not be bug but atleast there should be a option to prevent selection of words across multiple lines. I use tmux with multiple panes and encounter this issue often.
claunia added the Area-OutputIssue-BugResolution-DuplicateProduct-Terminal labels 2026-01-31 07:51:18 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (May 9, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (May 9, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [wordDelimiters not working inside tmux with [shift]+[left mouse click] (#9382)](https://github.com/microsoft/terminal/issues/9382), similarity score: 0.81 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@carlos-zamora commented on GitHub (May 15, 2024):

Thanks for filing! We're having trouble reproducing this. Would you be able to write up the steps required to get in this state /? This'll help us take a closer look 😊

@carlos-zamora commented on GitHub (May 15, 2024): Thanks for filing! We're having trouble reproducing this. Would you be able to write up the steps required to get in this state /? This'll help us take a closer look 😊
Author
Owner

@SivanagBalla commented on GitHub (May 16, 2024):

@carlos-zamora Below is another screen shot where we can reproduce it -

Open a terminal - adjust the width to say 80 or less. Width shouldn't matter here but it makes easy to repro
Start a tmux session with two vertical split panes
Type some lengthy strings in both panes.
Now shift-doubleclick on a string on one pane - terminal will expand the selectoin to other pane.

image

My word delimiters are set to "()"',;<>!@#$%^&*|+[]{}?│"

@SivanagBalla commented on GitHub (May 16, 2024): @carlos-zamora Below is another screen shot where we can reproduce it - Open a terminal - adjust the width to say 80 or less. Width shouldn't matter here but it makes easy to repro Start a tmux session with two vertical split panes Type some lengthy strings in both panes. Now shift-doubleclick on a string on one pane - terminal will expand the selectoin to other pane. ![image](https://github.com/microsoft/terminal/assets/19350704/045ceb54-9efd-4f11-bc96-bf46ecd85549) My word delimiters are set to "\()"',;<>~!@#$%^&*|+[]{}~?│"
Author
Owner

@carlos-zamora commented on GitHub (Jun 12, 2024):

Does this repro on Windows Terminal Canary?

@carlos-zamora commented on GitHub (Jun 12, 2024): Does this repro on [Windows Terminal Canary](https://aka.ms/terminal-canary-installer)?
Author
Owner

@SivanagBalla commented on GitHub (Jun 13, 2024):

Yes, just download (ver:1.22.1631.0) it and i can see the issue there also

@SivanagBalla commented on GitHub (Jun 13, 2024): Yes, just download (ver:1.22.1631.0) it and i can see the issue there also
Author
Owner

@carlos-zamora commented on GitHub (Jul 10, 2024):

We think this should be fixed by a combination of #15602 and some of the recent ConPTY work we've been doing. We're going to move the info over from that issue over here though since this has a nice test for it.

From what I understand, a row should only be marked as force-wrapped if we actually wrote past the last column, which naturally occurs already in the AdaptDispatch::_DoLineFeed call.

Removing the SetWrapForced call however breaks these unit tests:

ConptyOutputTests::InvalidateUntilOneBeforeEnd
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet0
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet1
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet2
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet3
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet4
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet5
TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet6
TerminalCoreUnitTests::ConptyRoundtripTests::ResizeRepaintVimExeBuffer
TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottom#metadataSet6
TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottom#metadataSet7
TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottom#metadataSet8
TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS#metadataSet6
TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS#metadataSet7
TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS#metadataSet8

They break because when a ROW is not marked as force-wrapped the output behavior of the VtEngine and its output changes. We need to investigate why they break, what the correct behavior should be and how we can fix it. Presumably most unit tests simply assert the wrong behavior, but it's also possible that VtEngine::_PaintUtf8BufferLine and its removeSpaces variable may have to be updated.

@carlos-zamora commented on GitHub (Jul 10, 2024): We think this should be fixed by a combination of #15602 and some of the recent ConPTY work we've been doing. We're going to move the info over from that issue over here though since this has a nice test for it. From what I understand, a row should only be marked as force-wrapped if we actually wrote past the last column, which naturally occurs already in the `AdaptDispatch::_DoLineFeed` call. Removing the `SetWrapForced` call however breaks these unit tests: ``` ConptyOutputTests::InvalidateUntilOneBeforeEnd TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet0 TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet1 TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet2 TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet3 TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet4 TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet5 TerminalCoreUnitTests::ConptyRoundtripTests::BreakLinesOnCursorMovement#metadataSet6 TerminalCoreUnitTests::ConptyRoundtripTests::ResizeRepaintVimExeBuffer TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottom#metadataSet6 TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottom#metadataSet7 TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottom#metadataSet8 TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS#metadataSet6 TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS#metadataSet7 TerminalCoreUnitTests::ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS#metadataSet8 ``` They break because when a `ROW` is not marked as force-wrapped the output behavior of the VtEngine and its output changes. We need to investigate why they break, what the correct behavior should be and how we can fix it. Presumably most unit tests simply assert the wrong behavior, but it's also possible that `VtEngine::_PaintUtf8BufferLine` and its `removeSpaces` variable may have to be updated.
Author
Owner

@nanaya commented on GitHub (Jan 22, 2025):

Still a problem on 1.23.250115001-llm

@nanaya commented on GitHub (Jan 22, 2025): Still a problem on 1.23.250115001-llm
Author
Owner

@DHowett commented on GitHub (May 13, 2025):

After a lot of deliberation, we're pretty sure this is a /dup of #8976.

@DHowett commented on GitHub (May 13, 2025): After a lot of deliberation, we're pretty sure this is a /dup of #8976.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 13, 2025):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (May 13, 2025): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21664