ckampfe / russ

A TUI RSS reader with vim-like controls and a local-first, offline-first focus
GNU Affero General Public License v3.0
173 stars 18 forks source link

[BUG] a little bug on Windows10 #22

Closed scillidan closed 5 months ago

scillidan commented 1 year ago

Is there an existing issue for this?

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

ckampfe commented 1 year ago

@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.

scillidan commented 1 year ago

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.

vgwidt commented 1 year ago

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.

sobharrison commented 1 year ago

@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.

ckampfe commented 5 months ago

@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..