bugGNU nano - Bugs: bug #60393, on OpenBSD, private-use code...


You are not allowed to post comments on this tracker with your current authentication level.

bug #60393: on OpenBSD, private-use code points cause cursor misplacement

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 14 Apr 2021 09:46:25 AM UTC  
Severity:  2 - Minor Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Tue 20 Apr 2021 09:21:52 AM UTC, comment #1: 

Worked around in git, commit bb819324, by overriding wcwidth() for characters beyond U+0F0000, which are the private-use ones.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 14 Apr 2021 09:46:25 AM UTC, original submission:  

To reproduce, run on OpenBSD:

printf "ab\xF3\xB2\xA2\x92:cd\xF4\x85\x95\xA5;" >private
src/nano --mini --cons +1 private

See that the cursor is on the "a" and that in the minibar it says "U+0061".  This is correct.  Now type <Right> once.  The cursor is now on the "b", but in the minibar it says "U+0062|F2892".  For some reason U+F2892 is seen as zero-width and thus gets 'combined' with the "b".  This is wrong.  Now type <Right> once more.  The terminal shows the cursor on the U+F2892 character (on my terminal shown as a 'hex block', 0F2/892), but in the minibar it says "U+003A".  Nano has skipped the zero-width character and has the internal cursor now positioned on the colon, but for the terminal U+F2892 is not zero-width, so this character sits where nano thinks the colon is.  :|

Weird.  Other systems (FreeBSD, NetBSD, Alpine, Xubuntu) do not exhibit this mistaken behavior for private use characters.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-30 bens Open/ClosedOpen => Closed
    2021-04-20 bens Severity3 - Normal => 2 - Minor
        StatusNone => Fixed
        Assigned toNone => bens

    Back to the top

    Powered by Savane 3.7