bug-ncurses
[Top][All Lists]
Advanced

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

Bug/Analysis: Incorrect Input Rendering after Undo_Justification


From: Leon Winter
Subject: Bug/Analysis: Incorrect Input Rendering after Undo_Justification
Date: Thu, 31 Aug 2017 15:07:37 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Hi,

attached test case shows the bug. Instead of correctly overriding the first
character in the field, the character is appended at the end of the text.

The cause is the incorrect state left by:
 - set_field_back
   - _nc_Synchronize_Attributes
     - Undo_Justification
When changing a field attribute the field needs to be redrawn. If the field
would normally be justified but no is the current field, justification will be
dropped and the function "Undo_Justification" will be called.
Otherwise "Buffer_To_Window" is called. The function "Buffer_To_Window" resets
the coordinates of the window cursor to that state before it was called. The
function "Undo_Justification" does not do that.
Therefore after the call of "set_field_back" the field is in a state of a
correct curcol (=0) but an incorrect window cursor (=end of text).

Maybe "Undo_Justification" should also properly reset the window cursor of its
drawing operation.

Regards,
Leon Winter

Attachment: bug.c
Description: Text Data


reply via email to

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