-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Resize ScreenInteractive::TerminalOutput() on SIGWINCH issue #951
Comments
Code is almost identical to menu example from repo #include "embf/directory.hpp"
#include "ftxui/component/component.hpp"
#include "ftxui/component/component_options.hpp"
#include "ftxui/component/screen_interactive.hpp"
#include "ftxui/dom/elements.hpp"
#include "ftxui/screen/screen.hpp"
#include <ftxui/dom/elements.hpp>
#include <iostream>
int main(int argc, char *argv[]) {
using namespace ftxui;
auto screen = ScreenInteractive::TerminalOutput();
std::vector<std::string> entries = {
"entry 1",
"entry 2",
"entry 3",
};
int selected = 0;
MenuOption option;
option.on_enter = screen.ExitLoopClosure();
auto menu = Menu(&entries, &selected, option) | borderLight;
screen.Loop(menu);
std::cout << "Selected element = " << selected << std::endl;
return 0;
} |
Hello, If you used If you know about any other solution, I would happily implement it. |
I see that fzf does this, but only when resize left/right. I guess that after sigwinch it redraws window at top of terminal, so it becomes fullscreen-like. See video below. I think that is not a bad solution, because anyway output of terminal becomes crap, so why not to clear it? What do you think about this? fzf_resizing.webm |
clearing the terminal during a screen width change looks like a good idea! Do you want to try submitting a PR? |
I think I can try, will open draft PR soon! |
Hi!
I got problem with terminal resizing and ScreenInteractive::TerminalOutput component. This issue appears not only in tmux, but also in plain terminal (tested on Kitty, Alacritty, Foot and Konsole). Redrawing works well when fullscreen.
How can I solve this? Compiled with clang 19, version of ftxui is 5.0.0
I am new to the TUI thing and this community, so sorry if this issue well known, I can't find anything about this.
redrawing_issue.webm
The text was updated successfully, but these errors were encountered: