]> git.saurik.com Git - apt.git/commitdiff
setup LINES in apt-pkg/install-progress.cc
authorMichael Vogt <mvo@debian.org>
Thu, 31 Oct 2013 22:24:41 +0000 (23:24 +0100)
committerMichael Vogt <mvo@debian.org>
Thu, 31 Oct 2013 22:24:41 +0000 (23:24 +0100)
apt-pkg/install-progress.cc

index f76fc88c2045c949b97891f5a9e16429e71832f5..b341fe6860302fc1a40fab341bf0c2d19c484952 100644 (file)
@@ -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);
 }