[Aptitude-svn-commit] r4122 - in branches/aptitude-0.3/aptitude: .
src/cmdline
Daniel Burrows
dburrows at costa.debian.org
Tue Sep 20 04:09:08 UTC 2005
Author: dburrows
Date: Tue Sep 20 04:09:04 2005
New Revision: 4122
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_spinner.cc
Log:
Don't blow up with long spinner messages
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Sep 20 04:09:04 2005
@@ -1,5 +1,10 @@
2005-09-19 Daniel Burrows <dburrows at debian.org>
+ * src/cmdline/cmdline_spinner.cc:
+
+ Really handle the case where the message we want to display is
+ longer than the screen width.
+
* src/broken_indicator.cc:
Display the resolver statistics while it's running.
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_spinner.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_spinner.cc (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_spinner.cc Tue Sep 20 04:09:04 2005
@@ -50,8 +50,9 @@
update_screen_width();
// Build the string to output.
- std::string out(msg, 0, screen_width);
- out.append(screen_width-1-out.size(), ' ');
+ std::string out(msg, 0, screen_width - 2);
+
+ out.append(screen_width - 1 - out.size(), ' ');
if(out.size() < screen_width)
out += spin_char();
More information about the Aptitude-svn-commit
mailing list