bug-ncurses
[Top][All Lists]
Advanced

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

Re: [widec] end-of-line strange behaviour


From: Thomas Dickey
Subject: Re: [widec] end-of-line strange behaviour
Date: Sat, 26 Mar 2005 14:59:10 -0500 (EST)

On Sat, 26 Mar 2005, Thomas Dickey wrote:

On Sun, 27 Mar 2005, TAKAHASHI Tamotsu wrote:

I have no idea why this problem occurs. But I have
never seen this problem with S-Lang, so I think it's
a bug in ncurses.

I'm not sure yet. Using your example, I see it is for a terminal 70 columns wide (which makes the URL wrap at the "right" place. I don't
see any misplaced characters except that the wrapping of the dashed
line looks suspicious - I'll investigate that and see why/what it is
doing.

The wrapping of the dashed line was incorrect: ncurses wrapped one cell too early, and mutt tried to guess what ncurses did rather than ask it
nicely.  So mutt became confused about what was on the screen.  I'm
adding this fix to ncurses (but mutt should ask, rather than guess):

diff -u -r1.91 base/lib_addch.c
--- base/lib_addch.c    2005/03/20 16:44:50     1.91
+++ base/lib_addch.c    2005/03/26 19:51:57
@@ -293,10 +293,10 @@
             * not fit, fill in the remainder of the line with blanks.  and
             * move to the next line.
             */
-           if (len > win->_maxx) {
+           if (len > win->_maxx + 1) {
                TR(TRACE_VIRTPUT, ("character will not fit"));
                return ERR;
-           } else if (x + len > win->_maxx) {
+           } else if (x + len > win->_maxx + 1) {
                int count = win->_maxx + 1 - x;
                TR(TRACE_VIRTPUT, ("fill %d remaining cells", count));
                fill_cells(win, count);

That may be the same bug as reported.  In the sample there's only one
message.  If mutt is confused about the screen contents, it is possible
that stepping from one message to the next will leave some characters
written to unexpected places.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]