From: Michael Vogt Date: Thu, 31 Oct 2013 22:24:41 +0000 (+0100) Subject: setup LINES in apt-pkg/install-progress.cc X-Git-Tag: 0.9.13.exp1~2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/bc37330b76f56a556ab1ddcd4e6cfb72640f5764 setup LINES in apt-pkg/install-progress.cc --- diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index f76fc88c2..b341fe686 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -235,6 +235,11 @@ void PackageManagerFancy::SetupTerminalScrollArea(int nr_rows) static const char *move_cursor_up = "\033[1A"; std::cout << move_cursor_up; + // setup env for (hopefully!) ncurses + string s; + strprintf(s, "%i", nr_rows); + setenv("LINES", s.c_str(), 1); + std::flush(std::cout); }