a-kenji/tui-term

[Question] How to remove first blank line and cursor?

Closed this issue · 3 comments

Premise

  • I use tui-term for my ratatui application(fzf-make) to preview make target which user selecting. (The red frame part)
    image
  • versions
    • ratatui: 0.24.0
    • tui-term: 0.1.5
    • rustc —version: rustc 1.74.0 (79e9716c9 2023-11-13) (Homebrew)

Question

  • I want to first blank line and cursor to be removed.
    image
    image

  • If you know how to remove them, please let me know.

  • Somehow, the first blank line is shown by running binary generated by cargo build --verbose --release. And there is no first blank line, if running cargo run.

Implementation

How to reproduce

  1. gh repo clone kyu08/fzf-make
  2. cd fzf-make
  3. make build-release
  4. ./target/release/fzf-make

Thank you for reaching out!

First blank line: Is that still an issue? I can't seem to reproduce it.

You can set the cursor through:

let pseudo_term = PseudoTerminal::new(screen).cursor(tui_term::widget::Cursor::default().symbol(""));

You can set the cursor through:

This works completely! Thanks!

First blank line: Is that still an issue? I can't seem to reproduce it.

For some reason, in my environment it reproduces only when I ran generated binary.

Also I noticed this did not not occur on linux.(I ran linux docker container on macOS)

I would like to continue to investigating this behavior as it may be unique to macOS.

Implemented in #132