Package: apt-get
Version: apt
Severity: minor
Tags: patch

Hi,

Some terminals can't print 80 characters on a single line without
opening a new line (those with the "sam" terminfo capability rather than
"am"). So by default, apt-get should only use 79 characters, leaving
the 80th for the cursor and hence avoiding spurious newlines. (See the
SigWinch() handler, which already subtracts 1 to the value obtained via
ioctl()). (Yes, the ioctl may _always_ fail on some terminals, so the
default value _is_ important).

--- cmdline/apt-get.cc.orig     2005-08-24 22:19:53.000000000 +0200
+++ cmdline/apt-get.cc  2005-08-24 22:20:19.000000000 +0200
@@ -66,7 +66,7 @@
 ostream c1out(0);
 ostream c2out(0);
 ofstream devnull("/dev/null");
-unsigned int ScreenWidth = 80;
+unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */
 
 // class CacheFile - Cover class for some dependency cache functions   /*{{{*/
 // ---------------------------------------------------------------------

Regards,
Samuel Thibault

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc4
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to