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

Can't select text while running the TUI #28

Closed
Pryz opened this issue May 1, 2024 · 2 comments
Closed

Can't select text while running the TUI #28

Pryz opened this issue May 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Pryz
Copy link
Contributor

Pryz commented May 1, 2024

When using the TUI dispatch run -- ... the user can't select copy/past anything in the terminal. This makes it difficult to share information while working locally.

Imagine a developer wanted to select an ID to query and dig further in the UI.

@Pryz Pryz added the bug Something isn't working label May 1, 2024
@achille-roussel
Copy link
Contributor

This is due to capturing the mouse motion, we need to let the terminal handle the mouse to allow selection for copy/paste:

diff --git a/cli/run.go b/cli/run.go
index 5bd2665..af115f6 100644
--- a/cli/run.go
+++ b/cli/run.go
@@ -200,8 +200,7 @@ Run 'dispatch help run' to learn about Dispatch sessions.`, BridgeSession)
                                p := tea.NewProgram(tui,
                                        tea.WithContext(ctx),
                                        tea.WithoutSignalHandler(),
-                                       tea.WithoutCatchPanics(),
-                                       tea.WithMouseCellMotion())
+                                       tea.WithoutCatchPanics())
                                wg.Add(1)
                                go func() {
                                        defer wg.Done()

☝️ applying this diff addressed the issue.

@chriso
Copy link
Contributor

chriso commented May 1, 2024

This should be fixed on the #25 branch.

@chriso chriso closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants