GNU nano - Bugs: bug #52258, with softwrap, combining...
You are not allowed to post comments on this tracker with your current authentication level.
bug #52258: with softwrap, combining characters at end of chunk are not displayed
Submitter: | Peter Passchier <pepa65> | ||
Submitted: | Sat 21 Oct 2017 02:15:34 AM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | dolorous | Open/Closed: | Closed |
Jump to the original submission
Sun 19 Nov 2017 08:26:23 AM UTC, comment #18: |
Benno Schulenberg <bens> |
Wed 25 Oct 2017 05:14:54 PM UTC, comment #17: The patch looks logical to me. The only thing is: the mbwidth() function is somewhat costly, and it needs to be called only when column == beyond. So... before pushing, I have swapped the two conditions.
|
Benno Schulenberg <bens> |
Tue 24 Oct 2017 03:38:28 PM UTC, comment #16: I've tried it with all the problematic lines from the file in comment #1, both with and without softwrap. Adding text until the combining characters are at the edge of the screen works in softwrap mdoe, and scrolling forward and back works when not in softwrap mode. So, in short, everything seems to work. |
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 07:26:14 PM UTC, comment #15: Attached a patch that seems to fix it; I'm still testing it. |
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 06:13:00 PM UTC, comment #14: And after more testing, the problem is not limited to softwrap mode: any line run through display_string() that ends in combining characters has problems (although outside of softwrap mode, they're different problems). For example, in an 80x24 terminal, and current git, run:
|
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 05:32:53 PM UTC, comment #13: And note that a chunk with missing combining characters due to this bug doesn't actually drop the characters (nano's navigation doesn't skip over them, so trying to move over them reveals them, and you can also tell by the column count that they're there); the characters are in the chunk, but they just aren't displayed. I've updated the bug description to reflect this. |
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 05:14:53 PM UTC, comment #12: And, for the record, nanocrap2.txt is the same file as the one attached to:
|
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 05:13:08 PM UTC, comment #11: Addendum: Actually, my patch does cause some breakage in certain cases. With it, and current git (4d35835), run:
|
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 05:04:27 PM UTC, comment #10: Looking into this, it isn't really the softwrap code per se causing this, it's the display_string() calls that the softwrap code is making to display the strings that's causing it. Since display_string() takes a range of columns to display, and combining characters are zero columns wide, that's leading to their being cut off (and only on lines that take up one row or less).
|
David Lawrence Ramsey <dolorous> |
Mon 23 Oct 2017 04:01:45 PM UTC, comment #9: Okay! Can reproduce now. Getting the author of the softwrap code into the loop... CC'ed. |
Benno Schulenberg <bens> |
Mon 23 Oct 2017 02:30:43 AM UTC, comment #8: It's a bug with softwrap. If I turn it off, all is normal. |
Peter Passchier <pepa65> |
Sun 22 Oct 2017 04:59:05 PM UTC, comment #7: So, if you take the 2.8.5 tarball and compile that, it renders the UTF testing text fine? Do you use softwrapping? And if you run the last released version (2.8.7) with --ignorercfiles, does it maybe render fine? How wide are the terminals that you use?
|
Benno Schulenberg <bens> |
Sun 22 Oct 2017 02:43:01 PM UTC, comment #6: The v3.5.3 branch is working OK here.
|
Peter Passchier <pepa65> |
Sun 22 Oct 2017 06:48:51 AM UTC, comment #5: If you do a 'git checkout v2.5.3' and build that, does that "suppress" some of the vectors and tone marks?
|
Benno Schulenberg <bens> |
Sat 21 Oct 2017 02:44:03 PM UTC, comment #4: Well, that makes it non-reproducable I guess... Still wonder why that happens here only with nano.
|
Peter Passchier <pepa65> |
Sat 21 Oct 2017 09:36:51 AM UTC, comment #3: Yes, the vector sign is on the b like it is on the a in line 57, and the tone mark at the end of line 123 is the same as the mark in the middle of the first half of line 127, and the mark at the end of line 129 is the same as the one at the start of line 130. They are all there. Visible and deletable and restorable. |
Benno Schulenberg <bens> |
Sat 21 Oct 2017 08:44:26 AM UTC, comment #2: Hmm, then it sounds like I might have a local problem..? The vector sign on the b is missing in line 57, and the tone marks on the last phonemes of lines 123 and 129. Just to check: those are all present on your system?
|
Peter Passchier <pepa65> |
Sat 21 Oct 2017 08:19:13 AM UTC, comment #1: I don't see any differences between how nano renders those lines and how less and vim do.
|
Benno Schulenberg <bens> |
Sat 21 Oct 2017 02:15:34 AM UTC, original submission:
Comparing nano's rendering with cat and vi of http://www.cl.cam.ac.uk/%7Emgk25/ucs/examples/UTF-8-demo.txt
|
Peter Passchier <pepa65> |
Depends on the following items: None found
Items that depend on this one: None found
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 11 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-11-19 | bens | Open/Closed | Open | Closed | |
2017-10-25 | bens | Status | Confirmed | Fixed | |
Assigned to | None | dolorous | |||
2017-10-23 | dolorous | Attached File | - | Added 0001-display-don-t-cut-off-zero-width-characters-at-the-e.patch, #42243 | |
2017-10-23 | dolorous | Attached File | - | Added combining-chars2.txt, #42242 | |
2017-10-23 | dolorous | Summary | with softwrap, combining characters at end of chunk are dropped | with softwrap, combining characters at end of chunk are not displayed | |
2017-10-23 | dolorous | Attached File | - | Added off-by-one-display-string.patch, #42238 | |
2017-10-23 | bens | Status | Need Info | Confirmed | |
Summary | Unicode rendering bugs | with softwrap, combining characters at end of chunk are dropped | |||
Carbon-Copy | - | Added dolorous | |||
2017-10-21 | bens | Status | None | Need Info |
Powered by Savane 3.13-f8d8.
Corresponding source code
Released in 2.9.0. Thanks for reporting. And fixing.