bugGNU nano - Bugs: bug #58011, in the Japanese locale, one...

 
 

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

bug #58011: in the Japanese locale, one character can overflow to the next row

Submitter:  Benno Schulenberg <bens>
Submitted:  Thu 19 Mar 2020 06:56:13 PM UTC
   
 
Severity:  2 - Minor Status:  Confirmed
Assigned to:  None Open/Closed:  Closed

Fri 15 May 2020 03:18:47 PM UTC, comment #5: 

Not a bug in nano.  Closing.

Benno Schulenberg <bens>
Group administrator
Tue 21 Apr 2020 02:37:25 PM UTC, comment #4: 
Benno Schulenberg <bens>
Group administrator
Wed 15 Apr 2020 03:26:28 PM UTC, comment #3: 
Benno Schulenberg <bens>
Group administrator
Wed 25 Mar 2020 11:33:52 AM UTC, comment #2: 
Benno Schulenberg <bens>
Group administrator
Fri 20 Mar 2020 03:20:25 PM UTC, comment #1: 

It can also happen with the Korean locale.  To reproduce, make your terminal 56 columns wide and 35 rows high.  Then run 'LANGUAGE=ko src/nano --ignore' and type ^G.  Note that "^U" and its description are just above the empty status bar, and that the last character on that line is "에".  Now make the terminal one column narrower.

Note that the last "word" of the ^U description disappears (because it gets wrapped to a subsequent row that cannot be shown now), but that the final "에" character has mistakenly appeared at the beginning of the status bar, directly above the inverse "^L".  :|

This is not something that nano can do: the status bar plus the two help lines are a separate subwindow, so the text from the edit window should never be able to overflow into the status bar -- the two subwindows do not overlap.  So... this must be an ncurses bug.  And unfortunately it cannot be sidestepped with the wredrawln() trick, because, as said, rewriting the text in the edit window never writes to the status bar.  :|

Benno Schulenberg <bens>
Group administrator
Thu 19 Mar 2020 06:56:13 PM UTC, original submission:  

To reproduce, make your terminal 80 columns wide,
then run: 'LANGUAGE=ja src/nano --ignore'.

Then type ^G, and possibly a few times ^N so that the line with "^R (Ins)" is at least two rows away from the status bar.

Then resize your terminal to 81 columns.  Note that the description of ^R has unwrapped and now fits on a single row.  Now resize back to 80 columns.  See how the character "み" appears on the row below the ^R, and roughly aligned (one space extra indent) with the first part of the description.  But see that there is also a "み" character at the beginning of the next row, directly above the ^W.  It shouldn't be there; it is misplaced.  Now type ^L.  The spurious "み" disappears.  (As does the spurious character that was below the ^K.)

Now...  If the "み" character had been on the row directly below the ^R, then it migh be a nano bug, but I cannot see how nano could possibly display a continuation character one row further down than where it should be.  This smells of an ncurses bug.

As the bug happened with Japanese, it reminded me of bug #31743.  So, add the line "#define USING_OLD_NCURSES yes" somewhere near the beginning of src/winio.c, and recompile.  Try the recipe again.  Now the overflow does not occur.  All that has changed is that we force ncurses to actually redraw each line that contains a double-width character, instead of trying to make use of what it thinks is already there.  This seems to prove that the spurious character is an ncurses redrawing bug.

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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-15 bens Open/ClosedOpen Closed
    2020-04-15 bens StatusNeed Info Confirmed
    2020-03-25 bens StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code