From 044c2684e7acc0887da331405ae8504a501a86ef Mon Sep 17 00:00:00 2001 From: rbrugo Date: Fri, 13 Oct 2023 20:05:08 +0200 Subject: [PATCH] feat: allow fullscreen without alternative screen --- include/ftxui/component/screen_interactive.hpp | 2 +- src/ftxui/component/screen_interactive.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ftxui/component/screen_interactive.hpp b/include/ftxui/component/screen_interactive.hpp index fd3a629f..d88da428 100644 --- a/include/ftxui/component/screen_interactive.hpp +++ b/include/ftxui/component/screen_interactive.hpp @@ -32,7 +32,7 @@ class ScreenInteractive : public Screen { static ScreenInteractive FixedSize(int dimx, int dimy); static ScreenInteractive Fullscreen(); static ScreenInteractive FitComponent(); - static ScreenInteractive TerminalOutput(); + static ScreenInteractive TerminalOutput(bool use_alternative_screen = true); // Options. Must be called before Loop(). void TrackMouse(bool enable = true); diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index 33660514..3f821a14 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -353,12 +353,12 @@ ScreenInteractive ScreenInteractive::FixedSize(int dimx, int dimy) { } // static -ScreenInteractive ScreenInteractive::Fullscreen() { +ScreenInteractive ScreenInteractive::Fullscreen(bool use_alternative_screen) { return { 0, 0, Dimension::Fullscreen, - true, + use_alternative_screen, }; }