[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)
- versions
- ratatui:
0.24.0
- tui-term:
0.1.5
rustc —version
:rustc 1.74.0 (79e9716c9 2023-11-13) (Homebrew)
- ratatui:
Question
-
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 runningcargo run
.
Implementation
- I implemented with reference to this example. (https://github.com/a-kenji/tui-term/blob/release/examples/simple_ls_rw.rs)
- The UI is defined here. (https://github.com/kyu08/fzf-make/blob/1d66fca49c0f8a4436c717a0876b3400768d3d42/src/usecase/fzf_make/ui.rs#L63)
- Showing preview of make target user selecting running bat on tui-term.(https://github.com/kyu08/fzf-make/blob/1d66fca49c0f8a4436c717a0876b3400768d3d42/src/usecase/fzf_make/ui.rs#L75)
How to reproduce
gh repo clone kyu08/fzf-make
cd fzf-make
make build-release
./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.