[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#525508: konsole corrupts the last line when it's written twice in a row.



Package: konsole
Version: 4:3.5.9.dfsg.1-6
Severity: normal

  When the last line of a konsole is updated twice in a row, once with a
shorter string and once with a longer string, both displayed
flush-right, the second string is displayed at the same starting
location as the first one and truncated to the length of the window.

  For instance, the attached program prints "0%" and then "50%" in the
lower-right hand corner of the terminal.  It works correctly in the
Linux console and in xterm, but konsole displays "50" instead of "50%".

  See #455220 for a manifestation of this in the real world.

  Daniel


-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages konsole depends on:
ii  kdelibs4c2a         4:3.5.10.dfsg.1-1+b1 core libraries and binaries for al
ii  libc6               2.9-4                GNU C Library: Shared libraries
ii  libgcc1             1:4.3.3-4            GCC support library
ii  libqt3-mt           3:3.3.8b-5+b1        Qt GUI Library (Threaded runtime v
ii  libstdc++6          4.3.3-4              The GNU Standard C++ Library v3
ii  libx11-6            2:1.1.5-2            X11 client-side library
ii  libxrender1         1:0.9.4-2            X Rendering Extension client libra

konsole recommends no packages.

Versions of packages konsole suggests:
ii  khelpcente 4:4.0.0.really.3.5.9.dfsg.1-6 help center for KDE

-- no debconf information
#include <ncurses.h>

#include <string.h>
#include <time.h>

int main(int argc, char **argv)
{
  int width;
  int height;

  const char *msg1 = "0%", *msg2 = "50%";
  int msg1len, msg2len;

  WINDOW *root;
  WINDOW *child;

  msg1len = strlen(msg1);
  msg2len = strlen(msg2);

  root = initscr();

  width = getmaxx(root);
  height = getmaxy(root);

  mvaddstr(height - 1, width - msg1len, msg1);

  refresh();

  mvaddstr(height - 1, width - msg2len, msg2);

  refresh();

  sleep(10);

  return 0;
}

Reply to: