소스 검색

setup LINES in apt-pkg/install-progress.cc

Michael Vogt 12 년 전
부모
커밋
bc37330b76
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      apt-pkg/install-progress.cc

+ 5 - 0
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);
 }