nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] Window resize handling


From: Mahyar Abbaspour
Subject: Re: [Nano-devel] [PATCH] Window resize handling
Date: Thu, 21 May 2015 11:55:46 +0430

On Thu, May 21, 2015 at 12:21 AM, Benno Schulenberg <address@hidden> wrote:

Could you explain in words what that three-way condition is
testing for?  Or at least the one condition that you added?

Actually, The bug is caused by the line 656 in prompt.c (revision 5225):
‫‪
return column - start_col - (column - start_col) % (COLS -
        start_col - 1);

When you resize the window, there is a point that (COLS - start_col - 1)
evaluates to zero. Therefore (column -start_col) % (COLS - start_col - 1)
becomes a division by zero statement which causes the floating point
exception. What I did was to exclude that condition from the return
statement and I added it as an exception to the if.
However, I have to say that I don't quite understand the algorithm used in
get_statusbar_page_start() but the obvious thing is that
(COLS - start_col - 1) should be considered an exception when it
evaluates to zero.

[...] when the window gets still narrower, and the
two help lines are present, the replacement string will wrap
to the next line and overwrite the "^G Help" string.  This is
not nice.

Yes, it does not fix the wrapping problem but at least, it's a hint to
whoever fixes the bug that "Hey, consider this special case".
 
Regards,
--

Mahyar

reply via email to

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