GNU nano - Bugs: bug #51355, commenting via Meta-3 works even...
You are not allowed to post comments on this tracker with your current authentication level.
bug #51355: commenting via Meta-3 works even when the syntax's comment=""
Submitter: | David Lawrence Ramsey <dolorous> | ||
Submitted: | Sun 02 Jul 2017 07:02:08 AM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | dolorous | Open/Closed: | Closed |
Sun 02 Jul 2017 06:04:27 PM UTC, comment #5: |
Benno Schulenberg <bens> |
Sun 02 Jul 2017 08:13:29 AM UTC, comment #4: Argho. Attached one last tweaked version of the patch: the comment of "#" is only set for every syntax in rcfile.c if ENABLE_COMMENT is defined, as it should have been before. |
David Lawrence Ramsey <dolorous> |
Sun 02 Jul 2017 08:00:43 AM UTC, comment #3: Attached an improved version of the patch that preserves nano's behavior: the comment of "#" is now the default for every syntax, even "none", unless it is explicitly overridden with something else, or unless it is explicitly unset by setting it to "". |
David Lawrence Ramsey <dolorous> |
Sun 02 Jul 2017 07:24:19 AM UTC, comment #2: Note that the patch changes nano's behavior in one way: if a syntax has no 'comment' line, it now gets treated as though it has a 'comment=""' line and gets its commenting disabled, as opposed to falling through to the default comment of "#" as it did before. (This is rooted in by the rcfile parsing code, which, according to comments, treats setting something to "" as equivalent to unsetting something.) Although the syntax "none" still gets the "#" comment. |
David Lawrence Ramsey <dolorous> |
Sun 02 Jul 2017 07:05:15 AM UTC, comment #1: And the attached patch should fix it. The check for a nonexistent comment wasn't quite right, so the comment was erroneously always left at the default value. |
David Lawrence Ramsey <dolorous> |
Sun 02 Jul 2017 07:02:08 AM UTC, original submission:
In current git (d1ee41f), commenting lines en masse by using Meta-3 always works, even when it shouldn't. This can be reproduced as follows, assuming nano was built with --enable-color and --enable-comment:
|
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 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-07-22 | bens | Open/Closed | Open | Closed | |
2017-07-02 | bens | Status | None | Fixed | |
Assigned to | None | dolorous | |||
2017-07-02 | dolorous | Attached File | - | Added 0001-tweaks-make-sure-commenting-is-disabled-when-comment.patch, #41104 | |
2017-07-02 | dolorous | Attached File | - | Added 0001-tweaks-make-sure-commenting-is-disabled-when-comment.patch, #41102 | |
2017-07-02 | dolorous | Attached File | - | Added 0001-tweaks-make-sure-commenting-is-disabled-when-comment.patch, #41101 |
Powered by Savane 3.13-3230.
Corresponding source code
Fixed in git, 2abe7c03. Thanks for the patch.