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

On Windows, ^X doesn't interrupt F mode if any other key is pressed first #435

Open
gwsw opened this issue Sep 24, 2023 · 3 comments
Open

Comments

@gwsw
Copy link
Owner

gwsw commented Sep 24, 2023

Steps to reproduce:

  1. Build less with Microsoft Visual C on Windows.
  2. While viewing a file, press F.
  3. While "Waiting for data" message is displayed, press "k".
  4. Press ^X.

Expected behavior: should exit F mode.
Actual behavior: remains in F mode. Works as expected if step 3 is omitted.

@gwsw
Copy link
Owner Author

gwsw commented Sep 24, 2023

The problem is that iread() calls win32_kbhit() and WIN32getch() to read the "k", and then calls WIN32ungetch(). After that, all subsequent iterations of this code re-read the "k" even if ^X is pressed. The ^X should somehow bypass the queue? Or maybe we don't really need to unget chars input while reading?

@gwsw
Copy link
Owner Author

gwsw commented Sep 24, 2023

Fixed in 04746ad.

@gwsw
Copy link
Owner Author

gwsw commented Sep 24, 2023

Fix in 04746ad was bad; reverted it so this is still open.

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

No branches or pull requests

1 participant