bug-ncurses
[Top][All Lists]
Advanced

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

Re: a double-width character can transgress to the next row


From: Benno Schulenberg
Subject: Re: a double-width character can transgress to the next row
Date: Tue, 14 Apr 2020 14:23:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Op 14-04-2020 om 01:32 schreef Thomas Dickey:
> On Mon, Apr 13, 2020 at 05:46:46PM +0200, Benno Schulenberg wrote:
>> Okay, how can I now get ncurses to dump its screen buffer to a file
>> at specific points in the program?
> 
> see attached (I modified doupdate)

Thanks.  With just the modified tty_update.c, running my recipe results
in nine screen dumps, numbered from 0 to 8.  Going from number 1 to 2,
the screen has widened, and all rows get an extra \s at the end.  Then,
going to number 3, nano redraws the screen adjusted for the new width,
and for row 21 the final \s\s get replaced with \u307f.  So far so good.

Now, going from dump number 4 to 5, the screen has narrowed again and
all rows lose an \s at the end -- except for row 21 and 25: they don't
lose the \u307f and \u7d0d at the end!  Only when going from dump 5 to 6,
when nano has redrawn the screen for the narrower width, do the \u307f
and \u7d0d get replaced by a single \s each.  But by then the badness
has already happened: the terminal has drawn the transgressing characters
on the succeeding row.

So, it seems something goes wrong when ncurses shrinks a window: a
double-width character that overshoots the total width of the window
does not get replaced with a space (or something) but is left alone.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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