Skip to content

UI: Optional scrollbar and mouse support for the preview panel #563

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

Merged
merged 4 commits into from
Jun 25, 2025

Conversation

lalvarezt
Copy link
Contributor

cleaned up keybinding section from config

@alexpasmantier you had this code before, perhaps there was a reason for it?

        if cfg!(not(windows)) {
            execute!(buffered_stderr, DisableMouseCapture)?;
        }

@alexpasmantier
Copy link
Owner

alexpasmantier commented Jun 25, 2025

image

Looks like this was related to #338 which was solved in #348 and it seems disabling mouse capture in windows caused a crash. But my memory is foggy on that one 😬

@lalvarezt
Copy link
Contributor Author

just tested it on windows and mouse scrolling works

@alexpasmantier
Copy link
Owner

Can't seem to get mouse scrolling working on my machine 🤔 Is there anything in particular I need to do or should it just work out of the box?

@lalvarezt
Copy link
Contributor Author

Can't seem to get mouse scrolling working on my machine 🤔 Is there anything in particular I need to do or should it just work out of the box?

the config lines are commented, I left it as opt in. just swap them

scroll_preview_half_page_down = ["ctrl-d"]
scroll_preview_half_page_up = ["ctrl-u"]  # CONFLICT: Ctrl+u is hardcoded for delete line
#scroll_preview_half_page_down = ["ctrl-d", "mousescrolldown"]  # Optional mouse support
#scroll_preview_half_page_up = ["ctrl-u", "mousescrollup"]  # Optional mouse support

@alexpasmantier
Copy link
Owner

Ahhh my bad, thanks! need a bit more coffee 🫠

@alexpasmantier
Copy link
Owner

Works perfectly 👍🏻

I think this should be enabled by default instead of being an opt-in.

@alexpasmantier
Copy link
Owner

Very nice! Great work 👍🏻

@alexpasmantier alexpasmantier merged commit 801b07f into alexpasmantier:cable-format-rework Jun 25, 2025
4 checks passed
@lalvarezt lalvarezt deleted the clean-up branch June 25, 2025 10:07
alexpasmantier pushed a commit that referenced this pull request Jun 28, 2025
cleaned up keybinding section from config

@alexpasmantier you had this code before, perhaps there was a reason for
it?

```rust
        if cfg!(not(windows)) {
            execute!(buffered_stderr, DisableMouseCapture)?;
        }
```
alexpasmantier pushed a commit that referenced this pull request Jun 28, 2025
cleaned up keybinding section from config

@alexpasmantier you had this code before, perhaps there was a reason for
it?

```rust
        if cfg!(not(windows)) {
            execute!(buffered_stderr, DisableMouseCapture)?;
        }
```
alexpasmantier pushed a commit that referenced this pull request Jun 28, 2025
…563)

cleaned up keybinding section from config

@alexpasmantier you had this code before, perhaps there was a reason for
it?

```rust
        if cfg!(not(windows)) {
            execute!(buffered_stderr, DisableMouseCapture)?;
        }
```
@raylu
Copy link
Contributor

raylu commented Jul 10, 2025

it seems like EnableMouseCapture gets called unconditionally
would you be open to adding a config flag to disable this feature? (I like to copy from the ctrl+r/history search and ctrl+y currently copies the whole histfile line)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants