GNU nano - Bugs: bug #53742, an external spell check of a...
You are not allowed to post comments on this tracker with your current authentication level.
bug #53742: an external spell check of a selected region inserts extra newline
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Tue 24 Apr 2018 07:23:02 PM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Sat 28 Apr 2018 09:19:57 AM UTC, comment #9: |
Benno Schulenberg <bens> |
Wed 25 Apr 2018 03:29:44 PM UTC, comment #8: Thanks for checking and testing. Pushed to master, commit faa0eb99. |
Benno Schulenberg <bens> |
Wed 25 Apr 2018 03:17:19 PM UTC, comment #7: Addendum: As in, I've also tested it, and it works as far as I can tell. |
David Lawrence Ramsey <dolorous> |
Wed 25 Apr 2018 03:13:58 PM UTC, comment #6: Looks good to me. |
David Lawrence Ramsey <dolorous> |
Wed 25 Apr 2018 09:43:55 AM UTC, comment #5: Here is the alternative patch. In my eyes this is neater: it doesn't need an extra variable to save and restore the flag. |
Benno Schulenberg <bens> |
Wed 25 Apr 2018 09:21:43 AM UTC, comment #4: Yeah, we reached the same conclusion simultaneously. I added a pause in do_alt_speller(), before the external speller is forked, and looked at the temp file: it already had an added 0x0A -- as one would expect when nonewlines isn't set. (And anyway, it would be strange if the speller changed the content of the temp file without changing the timestamp -- a changed timestamp would have caused the Modified to be set.)
|
Benno Schulenberg <bens> |
Wed 25 Apr 2018 08:31:49 AM UTC, comment #3: Forget the previous commentary with regards to spell checkers adding newlines; I was mistaken. If, as in your example, you ignore all misspelled words, then the spell checker isn't what's adding the magicline and throwing everything off.
|
David Lawrence Ramsey <dolorous> |
Wed 25 Apr 2018 02:14:42 AM UTC, comment #2: I've looked into it, and that commit does cause the problem. It's a combination of an oversight on my part and an undocumented behavior of aspell (and possibly other external spell checkers).
|
David Lawrence Ramsey <dolorous> |
Tue 24 Apr 2018 07:36:41 PM UTC, comment #1: David, I'm guessing that commit 234bd9c9 is the culprit for this -- I'll do a full bisect tomorrow. |
Benno Schulenberg <bens> |
Tue 24 Apr 2018 07:23:02 PM UTC, original submission:
To reproduce, run:
|
Benno Schulenberg <bens> |
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 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-04-28 | bens | Open/Closed | Open | Closed | |
2018-04-25 | bens | Status | In Progress | Fixed | |
2018-04-25 | bens | Summary | doing an external spell check of a selected region inserts a newline | an external spell check of a selected region inserts extra newline | |
2018-04-25 | bens | Summary | doing an external spell check inserts a newline (even when nothing was changed) | doing an external spell check of a selected region inserts a newline | |
2018-04-25 | bens | Summary | external spell checker inserts newline, even when nothing was changed | doing an external spell check inserts a newline (even when nothing was changed) | |
2018-04-25 | bens | Attached File | - | Added 0001-speller-don-t-add-an-extra-newline-when-saving-the-t.patch, #44024 | |
2018-04-25 | bens | Attached File | - | Added set-nonewlines-when-spellchecking-a-selection.patch, #44023 | |
Status | None | In Progress | |||
2018-04-25 | dolorous | Attached File | - | Added 0001-text-don-t-add-magiclines-to-temp-files-sent-to-the-.patch, #44021 | |
2018-04-24 | bens | Carbon-Copy | - | Added dolorous |
Powered by Savane 3.13-f8d8.
Corresponding source code
The fix has been released in 2.9.6.