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

default pager repeats inputs on windows #3448

Open
Zoybean opened this issue Apr 4, 2024 · 2 comments
Open

default pager repeats inputs on windows #3448

Zoybean opened this issue Apr 4, 2024 · 2 comments

Comments

@Zoybean
Copy link

Zoybean commented Apr 4, 2024

Description

inputs are duplicated in default pager
cannot select text in default pager

Steps to Reproduce the Problem

  1. Open windows terminal
  2. navigate to a jj repo
  3. jj log
  4. press / and start typing (e.g. "cat")
  5. click and drag mouse to select text

Expected Behavior

pager searches for the entered term (e.g. "cat")
terminal selects the moused-over text

Actual Behavior

pager has duplicated every keypress, so it is searching for e.g. "/ccatat" instead of "cat"
cannot select text, and screen appears to refresh every time the mouse moves (flicker no longer happens in 0.16)

Specifications

  • Platform: Windows 10
  • Version: jj 0.16.0 (originally jj 0.15.1-bf76080f42f77cad934d9a5202c7b7d29ab2c890)
@ErichDonGubler
Copy link
Collaborator

This actually goes a few layers down into dependencies. 😅 minus updated its crossterm dependency in AMythicDev/minus@39224c3, which started reporting key repeats and releases (distinguished by the KeyEvent::kind field) when the KeyboardEnhancementFlags::REPORT_EVENT_TYPES feature was set. minus didn't migrate code to distinguish these events, so it ends up duplicating input when the feature is set. crossterm always1 sets this feature on Windows, so this bubbled up to jj.

I've filed an issue and PR pair in minus upstream to handle this bug:

Footnotes

  1. This is slated to change to be opt-in with https://github.com/crossterm-rs/crossterm/pull/778.

@ErichDonGubler
Copy link
Collaborator

Update: minus upstream has merged AMythicDev/minus#141, and is awaiting release.

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

No branches or pull requests

3 participants