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

Submitter:  Benno Schulenberg <bens>
Submitted:  Wed 14 Apr 2021 09:46:25 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  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>
Group administrator
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>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.13-4448.
    Corresponding source code