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.)
--- 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);