rhysd / tui-textarea

Simple yet powerful multi-line text editor widget for ratatui and tui-rs
https://crates.io/crates/tui-textarea
MIT License
323 stars 61 forks source link

fix windows double character #17

Closed pm100 closed 1 year ago

pm100 commented 1 year ago

fix for https://github.com/rhysd/tui-textarea/issues/14

a change in crossterm 0.26 (https://github.com/crossterm-rs/crossterm/pull/745) causes key release event to be generated on windows. The input handler of textarea was treating those as additional keystrokes. The same bug was apparent in all the samples

Note I also added some logging. I did not remove it as the plumbing is useful to have (I think)

rhysd commented 1 year ago
pm100 commented 1 year ago

(I hope i have updated PR correctly - still git noob)

Logging in samples removed

I tested all relevant samples with tui (cross 25) and ratatui (cross 26)

rhysd commented 1 year ago

@pm100 There are still some unnecessary changes. But it's OK. I'll cherry-pick necessary part of your changes.

rhysd commented 1 year ago

@pm100 I cherry-picked your change at 68f4e0d. Though this PR is closed without merge, your change was included in the main branch.