Repository: ynqa/promkit (language: rust)

Issue:
Broken format by multiple `println`
When many lines are printed after `run()`, the output format seems to be broken.

```rust
use promkit::{preset::readline::Readline, suggest::Suggest};

fn main() {
    let mut p = Readline::default()
        .title("Hi!")
        .enable_suggest(Suggest::from_iter([
            "apple",
            "applet",
            "application",
            "banana",
        ]))
        .prompt()
        .unwrap();

    let cmd = p.run().unwrap();
    println!("result: {:?}", cmd);
    println!("result: {:?}", cmd);
    println!("result: {:?}", cmd);
}
```

```
$ cargo run
Hi!
❯❯ a
result: "a"
           result: "a"
                      result: "a"
```


Discussion / hints:

Fix patch:
diff --git a/promkit/src/lib.rs b/promkit/src/lib.rs
index 96feefc8..eacd91ed 100644
--- a/promkit/src/lib.rs
+++ b/promkit/src/lib.rs
@@ -283,6 +283,7 @@ impl<T: Renderer> Prompt<T> {
             terminal.draw(&self.renderer.create_panes(size.0, size.1))?;
         }
 
+        disable_raw_mode()?;
         self.renderer.finalize()
     }
 }


Test patch: