Fix display of last character in the input line when Aspell support is enabled
authorMikael Berthe <mikael@lilotux.net>
Sun, 08 Feb 2009 10:08:05 +0100
changeset 1570 d64e0b2855fc
parent 1567 bff9633e38ee
child 1571 48c2060845ac
Fix display of last character in the input line when Aspell support is enabled The rightmost character displayed in the input line was always the last character of the line. (Reported by isbear.)
mcabber/src/screen.c
--- a/mcabber/src/screen.c	Tue Jan 27 22:19:04 2009 +0100
+++ b/mcabber/src/screen.c	Sun Feb 08 10:08:05 2009 +0100
@@ -3583,6 +3583,7 @@
 {
   char *wprint_char_fmt = "%c";
   int point;
+  int nrchar = maxX;
   char *ptrCur = inputLine + inputline_offset;
 
 #ifdef UNICODE
@@ -3593,7 +3594,7 @@
 
   wmove(inputWnd, 0, 0); // problem with backspace
 
-  while (*ptrCur) {
+  while (*ptrCur && nrchar-- > 0) {
     point = ptrCur - inputLine;
     if (maskLine[point])
       wattrset(inputWnd, A_UNDERLINE);