From bc37330b76f56a556ab1ddcd4e6cfb72640f5764 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 31 Oct 2013 23:24:41 +0100 Subject: setup LINES in apt-pkg/install-progress.cc --- apt-pkg/install-progress.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to '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); } -- cgit v1.2.3