russ icon indicating copy to clipboard operation
russ copied to clipboard

[BUG] a little bug on Windows10

Open scillidan opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

{"label"=>"Windows"}

Current Behavior

I install russ on Windows10 and WSL2.
It runs well on WSL.
But on Windows, I can't paste urls or make input. Any letter I type will be double.

Snipaste_2023-06-26_20-29-26

Expected Behavior

No response

Steps To Reproduce

No response

Anything else?

I used DBeaver to edit the feeds.db file.
Added a subscription, then update it.

Snipaste_2023-06-26_20-38-05

It is pleasant that it works well.

Snipaste_2023-06-26_20-39-48

scillidan avatar Jun 26 '23 13:06 scillidan

@scillidan thank you for the bug report! Can you confirm: is this running on the host Windows or in the WSL2 VM?

I have not tried to run russ on Windows, only WSL2, but I will try to reproduce this issue as soon as possible. Thank you.

ckampfe avatar Sep 14 '23 02:09 ckampfe

Just take your time, guys :) I run it on both Windows and WSL2. On windows, its function should be good. Just when entering the feed-url, there is a bug.

scillidan avatar Sep 14 '23 12:09 scillidan

I think it's because the keyup event is being picked up: https://docs.rs/crossterm/latest/crossterm/event/struct.KeyEvent.html#structfield.kind

Similar issue in ratatui example for Windows: https://github.com/ratatui-org/ratatui/pull/44/files

Adding a check for KeyEventKind::Press should fix it.

vgwidt avatar Oct 07 '23 06:10 vgwidt

@vgwidt Yup, can confirm it picks up keyup.

@scillidan This bug impacts me on Windows for both Mode::Normal and Mode::Editing. It doubles my inputs on everything.

sobharrison avatar Oct 25 '23 07:10 sobharrison

@scillidan Thank you again for opening this bug report. This is now fixed in https://github.com/ckampfe/russ/commit/4c3e25931f13276f0c591eac57f6ed0af95fe08f.

Thank you very much @sobharrison for contributing the fix..

ckampfe avatar Jun 01 '24 21:06 ckampfe