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

with ConsoleZ scrolling does not always work #77

Closed
char101 opened this issue Feb 23, 2021 · 6 comments
Closed

with ConsoleZ scrolling does not always work #77

char101 opened this issue Feb 23, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@char101
Copy link

char101 commented Feb 23, 2021

Hi,

I am using clink with Console.

Case A: the screen is showing the command prompt. Then I run dir three times so I can scroll up.

  • Scrolling using Wheel-Up does not work. It scroll up for one line and then immediately scroll down again.
  • Scrolling using Alt-Up works as intended.
  • Scrolling using the up button in the scrollbar does not work.
  • After pressing Alt-Up, now using Wheel-Up works.
  • If I press Enter, creating a new command prompt line, now using Wheel-Up does not work again.

Case B: the console prompt is showing the python prompt.

  • Scrolling using Wheel-Up works as intended.
  • Scrolling using the up button in the scrollbar works as intended.
  • Scrolling using Alt-Up does not work (it has no effect).

If I run clink with cmd.exe directly.

Case A: the screen is showing the command prompt. Then I run dir three times so I can scroll up.

  • Scrolling using Wheel-Up works as intended.
  • Scrolling using the up button in the scrollbar works as intended.
  • Scrolling using Alt-Up works as intended.

Case B: the console prompt is showing the python prompt.

  • Scrolling using Wheel-Up does not work.
  • Scrolling using the up button in the scrollbar works as intended.
  • Scrolling using Alt-Up does not work.
@chrisant996
Copy link
Owner

chrisant996 commented Feb 24, 2021

Confirmed. Thanks for reporting this! For some reason, Console sends a "window size changed" event when scrolling. That was causing Clink to reset the scroll position. I'm sure Console won't be the only console host that does that.

I've made a change so when "window size changed" happens Clink will only reset the scroll position if the blinking cursor gets moved to a different line.

And thank you for very clear and detailed steps! That makes it so much easier to track things down. :)

@chrisant996 chrisant996 changed the title Scrolling does not always work with ConsoleZ scrolling does not always work Feb 24, 2021
@char101
Copy link
Author

char101 commented Feb 24, 2021

Thank you for fixing the scrolling in ConsoleZ.

What about the inability to scroll using Wheel-Up in cmd.exe when a certain interactive program is running?

I tried with:

  • python.exe repl, Wheel-Up does not work.
  • python.exe running sleep(10), Wheel-Up does not work.
  • sqlite3.exe repl, Wheel-Up does not work.
  • julia.exe repl, Wheel-Up works.

@chrisant996
Copy link
Owner

chrisant996 commented Feb 24, 2021

Does the Wheel-Up problem occur even if Clink is not injected into the host cmd.exe process?

If so, then Clink isn't involved. At that point I can't really comment on what the other programs might be doing that interferes with input processing. If it only happens inside ConsoleZ then it's almost certainly a ConsoleZ issue. Actually, it's probably the same issue that was causing a problem for Clink -- ConsoleZ sends unnecessary input ("window size changed") to the currently active console program when the mouse wheel is used. If the program is not actively reading input, then the wheel will probably not work, because of the extra unnecessary input being sent.

Can't really say, though. It might be good to bring the issue to the attention of ConsoleZ. The project appears to still be active, even though there hasn't been a release in almost 2 years.

@char101
Copy link
Author

char101 commented Feb 24, 2021

You are right. Wheel-Up also does not work even when clink isn't injected into the process. Sorry, I haven't use python in cmd.exe directly for so long that I did not realize that it is the original behavior.

By the way, this does not happen inside ConsoleZ. In fact, Wheel-Up works when running python interpreter in ConsoleZ. It does not work when running python interpreter in cmd.exe window, i.e. not inside any console manager.

@char101
Copy link
Author

char101 commented Feb 24, 2021

I can confirm that scrolling works in all case (when the console is showing the prompt and when running an application) in ConsoleZ with release v1.1.33. Thanks.

@chrisant996
Copy link
Owner

I can confirm that scrolling works in all case (when the console is showing the prompt and when running an application) in ConsoleZ with release v1.1.33. Thanks.

Thank you!

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

2 participants