summaryrefslogtreecommitdiff
path: root/apt-pkg/install-progress.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-22 14:38:39 +0100
committerMichael Vogt <mvo@debian.org>2013-12-22 14:49:52 +0100
commit4754718a4461ebff89f5b49c385a007b4197bcff (patch)
treeafa47d46939f5380bf3b1490f4dcb4d44073ffb3 /apt-pkg/install-progress.cc
parent9b7c10509c534b7d413b5102231cb0ca387f1c65 (diff)
first proof-of-concept for a fix for #731738
Diffstat (limited to 'apt-pkg/install-progress.cc')
-rw-r--r--apt-pkg/install-progress.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc
index b82b7efde..2215fb1f5 100644
--- a/apt-pkg/install-progress.cc
+++ b/apt-pkg/install-progress.cc
@@ -273,11 +273,18 @@ void PackageManagerFancy::HandleSIGWINCH(int)
SetupTerminalScrollArea(nr_terminal_rows);
}
-void PackageManagerFancy::Start()
+void PackageManagerFancy::Start(int child_pty)
{
int nr_terminal_rows = GetNumberTerminalRows();
if (nr_terminal_rows > 0)
+ {
SetupTerminalScrollArea(nr_terminal_rows);
+ // *cough*
+ struct winsize win;
+ ioctl(child_pty, TIOCGWINSZ, (char *)&win);
+ win.ws_row = nr_terminal_rows - 1;
+ ioctl(child_pty, TIOCSWINSZ, (char *)&win);
+ }
}
void PackageManagerFancy::Stop()