[Top][All Lists]

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

Patch for duplication of wide characters by chgat

From: Aleksi Torhamo
Subject: Patch for duplication of wide characters by chgat
Date: Sun, 27 May 2007 22:23:29 +0300 (EEST)
User-agent: SquirrelMail/1.4.3a


I noticed that using chgat on a line with multicolumn characters duplicates
those characters on display. Chgat overwrites the bits in attr that tell if
a character takes up multiple columns, so ncurses thinks they are separate
characters. I'm unfamiliar with the ncurses internals, so I don't know where
the fix should go (should the fix be something like limiting the bits which
macros like SetAttr and SetPair overwrite, or should the fix be local to
chgat) but i made a temporary patch to chgat for preserving the multicolumn

Small test program (chgat-bug.c) and patch
(ncurses-5.6-chgat-multicolumn-duplication.patch) attached.

While researching the above bug, i also noticed an unrelated bug causing
program abort. Small test program (trace-bug.c) attached.

PS. Both test programs are utf8, and the used multicolumn character is the
"big A" from test/widechars-utf8.txt

Aleksi Torhamo

Attachment: chgat-bug.c
Description: Text Data

Attachment: trace-bug.c
Description: Text Data

Attachment: ncurses-5.6-chgat-multicolumn-duplication.patch
Description: Binary data

reply via email to

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