bug-ncurses
[Top][All Lists]
Advanced

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

Re: misplaced cursor when a double-width character is near the lower-rig


From: sunnycemetery
Subject: Re: misplaced cursor when a double-width character is near the lower-right corner
Date: Sat, 30 Jan 2021 01:57:15 -0500

2021-01-28, 10:54, Benno Schulenberg:
On the bottom row? Near the right edge? And with a double-width character involved? On what terminal?

Yes on all accounts.  This was with XTerm(362).

I created a dumb workaround in the form of a function named SecondHalfOfDoubleWidth that, given a window and y/x coordinate, simply returns true if the character at said coordinate represents the second half of a double-width character:

_⌄
ア

If any drawing operation is attempted from such a character, simply add one to the x-value (skipping the chopped-off double-width character) and draw as usual. I have been unable to reproduce the error with the workaround in place.

See the attachment for the function. Warning: It really is dumb (but it works).

Attachment: SecondHalfOfDoubleWidth.c
Description: Text document


reply via email to

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