Repository: alexpasmantier/television (language: rust)

Issue:
Text gets scrambled when pasting into television input
**Description**
when I am pasting text into tv input, it is getting scrambled. I have tested this in both alacritty and rio terminal emulators. Here is a video

https://github.com/user-attachments/assets/879414fa-f52e-4e71-892b-fd4742e607da

I tried downloading binaries from github releases, and doing a "bisect", and issue starts appearing from 0.10.3 (it worked in 0.10.2), and my guess from reading the changelog are the buffering improvements
 

**Example**
```
cat hello | tv

# then paste stuff with terminal paste shortcut (for me Ctrl+shift+c)
```

**Expected behavior**
Text should not be scrambled

**Actual behavior**
Text is scrambled

**Environment**
 - OS: Arch Linux
 - Rust version: rustc 1.84.1 (e71f9a9a9 2025-01-27) (Arch Linux rust 1:1.84.1-1)
 - Project version: television 0.10.5
 - [Any other dependency version if needed] - (latest releases of alacritty and rio, pasting text into them works normally)



Discussion / hints:

Fix patch:
diff --git a/television/app.rs b/television/app.rs
index f1e7de5..65ae958 100644
--- a/television/app.rs
+++ b/television/app.rs
@@ -79,7 +79,7 @@ impl From<ActionOutcome> for AppOutput {
 }
 
 const EVENT_BUF_SIZE: usize = 4;
-const ACTION_BUF_SIZE: usize = 16;
+const ACTION_BUF_SIZE: usize = 8;
 
 impl App {
     pub fn new(
@@ -246,8 +246,6 @@ impl App {
         buf: &mut Vec<Action>,
     ) -> Result<ActionOutcome> {
         if self.action_rx.recv_many(buf, ACTION_BUF_SIZE).await > 0 {
-            buf.sort_unstable();
-            buf.dedup();
             for action in buf.drain(..) {
                 if action != Action::Tick {
                     trace!("{action:?}");


Test patch: