GNU nano - Bugs: bug #51671, --softwrap --atblanks mishandles...
You are not allowed to post comments on this tracker with your current authentication level.
bug #51671: --softwrap --atblanks mishandles multicolumn Unicode spaces
Submitter: | David Lawrence Ramsey <dolorous> | ||
Submitted: | Sat 05 Aug 2017 10:53:55 PM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | dolorous | Open/Closed: | Closed |
Jump to the original submission
Tue 26 Sep 2017 07:05:48 PM UTC, comment #21: |
Benno Schulenberg <bens> |
Sun 24 Sep 2017 07:55:12 PM UTC, comment #20: Thank you, and good to know; your reply seems to have put you in the carbon-copy list in this case.
|
David Lawrence Ramsey <dolorous> |
Sun 24 Sep 2017 07:28:35 PM UTC, comment #19: Oh! I hadn't seen that you have updated this patch several times. When... you feel that you've reached the final version, don't hesitate to put me (bens) in the Carbon-Copy list. (Only when a new bug or patch is posted, I get an email, but afterward not until I have made a comment on the bug or patch.)
|
Benno Schulenberg <bens> |
Sun 17 Sep 2017 07:21:49 PM UTC, comment #18: Attached one last version. The only change relative to the last one is to remove a comment that merely re-describes what the code does. Now, these changes make the patched code take up one less line than the original code. |
David Lawrence Ramsey <dolorous> |
Sat 16 Sep 2017 09:50:31 PM UTC, comment #17: Attached yet another new version that simplifies things again.
|
David Lawrence Ramsey <dolorous> |
Fri 15 Sep 2017 05:45:54 PM UTC, comment #16: Attached one last new version that cosmetically reduces the number of lines added (one less blank line, and a shorter added comment explaining the fallthrough condition). |
David Lawrence Ramsey <dolorous> |
Tue 12 Sep 2017 03:21:26 PM UTC, comment #15: Attached one more new version. This reshuffles things to be in the same order as the rest of get_softwrap_breakpoint(), and eliminates a temporary variable in the process. |
David Lawrence Ramsey <dolorous> |
Sat 26 Aug 2017 10:46:44 AM UTC, comment #14: ...and fix an ambiguity in the comment dealing with reversed logic: "there" does not mean the edge of the screen in that case. |
David Lawrence Ramsey <dolorous> |
Sat 26 Aug 2017 10:23:17 AM UTC, comment #13: Attached one last new version. The comment changes are now reduced to the absolutely necessary ones: one to indicate reversed logic relative to current git, and one to indicate a fallthrough condition that current git doesn't have. |
David Lawrence Ramsey <dolorous> |
Thu 24 Aug 2017 11:03:38 PM UTC, comment #12: Attached new version fixes a potential lockup on a two-column screen with --atblanks and Unicode 003000. (It also shortens the commit message a bit.)
|
David Lawrence Ramsey <dolorous> |
Thu 24 Aug 2017 09:58:01 PM UTC, comment #11: ...and simplified it again. The comments are now shorter, and the text pointer is now incremented in atblanks mode only if necessary. |
David Lawrence Ramsey <dolorous> |
Thu 24 Aug 2017 09:26:23 PM UTC, comment #10: Attached new version that's a bit simpler (it adds one less line). |
David Lawrence Ramsey <dolorous> |
Sun 20 Aug 2017 04:54:38 PM UTC, comment #9: Attached new version with improved comments (they take up the same number of lines as before). |
David Lawrence Ramsey <dolorous> |
Wed 16 Aug 2017 06:47:54 PM UTC, comment #8: Attached new, even simpler version that has less duplicate code. (It does add a few comments to clarify what's going on, however.) |
David Lawrence Ramsey <dolorous> |
Tue 15 Aug 2017 09:31:55 PM UTC, comment #7: Forget that one; it breaks handling of tabs if, say, you opened the nano binary with itself. This new version fixes the problem, and uses even less code in the process. Sorry for the mess. |
David Lawrence Ramsey <dolorous> |
Tue 15 Aug 2017 09:25:12 PM UTC, comment #6: Attached new version: it's reworked a bit to take up one less line. |
David Lawrence Ramsey <dolorous> |
Tue 15 Aug 2017 06:03:36 PM UTC, comment #5: And now that the aforementioned bug is fixed and its relevant code is applied, here's a proper standalone version of this patch, against git 8b86af3. |
David Lawrence Ramsey <dolorous> |
Sun 13 Aug 2017 04:21:01 PM UTC, comment #4: Updated again, to account for the new patch at bug #51621. |
David Lawrence Ramsey <dolorous> |
Sun 13 Aug 2017 03:32:23 AM UTC, comment #3: Updated fix attached, that doesn't use incorrect logic when adding tabs to the beginning of a chunk after the first one in the line. |
David Lawrence Ramsey <dolorous> |
Sun 06 Aug 2017 03:35:00 PM UTC, comment #2: Addendum: the fix is attached, although it requires the patch at bug #51621 to be applied first. |
David Lawrence Ramsey <dolorous> |
Sat 05 Aug 2017 11:01:14 PM UTC, comment #1: For the record, the fix for this can be found here:
|
David Lawrence Ramsey <dolorous> |
Sat 05 Aug 2017 10:53:55 PM UTC, original submission:
Currently, in git 94b484e, if nano is running with softwrap and atblanks, it should break before multi-column Unicode blanks if they would go over the edge of the screen, but it doesn't. This can be reproduced as follows:
|
David Lawrence Ramsey <dolorous> |
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 23 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-11-19 | bens | Open/Closed | Open | Closed | |
2017-09-26 | bens | Status | In Progress | Fixed | |
Summary | atblanks softwrap mishandles multicolumn Unicode blanks | --softwrap --atblanks mishandles multicolumn Unicode spaces | |||
2017-09-24 | bens | Severity | 3 - Normal | 2 - Minor | |
Status | None | In Progress | |||
Assigned to | None | dolorous | |||
2017-09-17 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41821 | |
2017-09-16 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41816 | |
2017-09-15 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41811 | |
2017-09-12 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41787 | |
2017-08-26 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41667 | |
2017-08-26 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41666 | |
2017-08-24 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41648 | |
2017-08-24 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41647 | |
2017-08-24 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41646 | |
2017-08-20 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41591 | |
2017-08-16 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41543 | |
2017-08-15 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41536 | |
2017-08-15 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41535 | |
2017-08-15 | dolorous | Attached File | - | Added 0001-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41528 | |
2017-08-13 | dolorous | Attached File | - | Added 0002-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41506 | |
2017-08-13 | dolorous | Attached File | - | Added 0002-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41499 | |
2017-08-06 | dolorous | Attached File | - | Added 0002-softwrap-break-before-multi-column-Unicode-blanks-if.patch, #41438 |
Powered by Savane 3.13-4448.
Corresponding source code
Thanks for the patch. Pushed to git, 504a9725.
The doubt about char_len is "solved" by my reshuffling things a bit in a subsequent commit -- char_len might already be set to the right value, but we have to do the parse_mbchar() anyway (to get the column after the blank), so we might just as well assign the result to char_len, and be certain that the value is correct.