Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNU screen 上で画面クリアがされない #40

Closed
cympfh opened this issue Feb 16, 2022 · 2 comments
Closed

GNU screen 上で画面クリアがされない #40

cympfh opened this issue Feb 16, 2022 · 2 comments
Assignees

Comments

@cympfh
Copy link

cympfh commented Feb 16, 2022

GNU screen 上で起動した場合に限り, hwatch 起動直後に画面クリアがされず, それまでのテキストが残ったままになります。
試しに明示的に terminal.clear()?; を追加してみると期待通りに動きました。
(このライブラリに明るくないのでこれが正しい修正なのかは知らないです)

--- a/src/view.rs
+++ b/src/view.rs
@@ -73,6 +73,7 @@ impl View {
         execute!(stdout, EnterAlternateScreen, EnableMouseCapture)?;
         let backend = CrosstermBackend::new(stdout);
         let mut terminal = Terminal::new(backend)?;
+        terminal.clear()?;

         {
             let input_tx = tx.clone();
@blacknon
Copy link
Owner

あ、ありがとうございます〜!
多分正しいです(どうやらscreenがデフォルトだとaltscreen対応してなくて、それが原因ぽいです)

fdehau/tui-rs#344

@blacknon blacknon self-assigned this Feb 16, 2022
@blacknon blacknon mentioned this issue Feb 20, 2022
@blacknon
Copy link
Owner

0.3.2で対応出来たのでクローズします

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants