summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-31 23:24:41 +0100
committerMichael Vogt <mvo@debian.org>2013-10-31 23:24:41 +0100
commitbc37330b76f56a556ab1ddcd4e6cfb72640f5764 (patch)
tree915b21d11b98d34cb9d8e019e4e77978f958e452 /apt-pkg
parent790d41f6372871e527f3fc9da66d049937b4c780 (diff)
setup LINES in apt-pkg/install-progress.cc
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/install-progress.cc5
1 files changed, 5 insertions, 0 deletions
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);
}