GNU nano - Bugs: bug #52182, on Haiku and Gentoo, the first...
You are not allowed to post comments on this tracker with your current authentication level.
bug #52182: on Haiku and Gentoo, the first comments are uncolored at startup
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Sat 07 Oct 2017 01:37:44 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Mon 13 Nov 2017 07:06:01 PM UTC, comment #16: |
Benno Schulenberg <bens> |
Sun 12 Nov 2017 11:16:18 PM UTC, comment #15: That works on an unpatched Gentoo and syntax highlighting doesn't appear to be any slower. Which is good because if Gentoo applies the fix, it will still have the 20150808 date. |
Brand Huntsman <brand> |
Sun 12 Nov 2017 12:39:19 PM UTC, comment #14: A partial fix is not good enough. And a partial fix that causes some breakage elsewhere is unacceptable.
|
Benno Schulenberg <bens> |
Sun 12 Nov 2017 06:53:55 AM UTC, comment #13: I don't think a hack that slows down nano for everyone should be applied to fix an issue only experienced by a few. Detecting ncurses 6.0 before adding A_PROTECT to syntax colors would also be unacceptable since the largest distros have a patched ncurses 6.0.
|
Brand Huntsman <brand> |
Sat 11 Nov 2017 04:28:35 PM UTC, comment #12: Forgot to attach the patch. Now then: |
Benno Schulenberg <bens> |
Sat 11 Nov 2017 04:27:49 PM UTC, comment #11: Changing the wrefresh() call at the end of statusline() is not an option, because it would prevent any feedback when nano is loading a huge file or when searching takes a long time.
|
Benno Schulenberg <bens> |
Wed 08 Nov 2017 08:37:08 PM UTC, comment #10: Gentoo only applies security and other important patches to packages that don't release often. I am going to submit the patch to Gentoo since nano is slightly broken by it, but ncurses 6.1 might be released before it gets applied.
|
Brand Huntsman <brand> |
Wed 08 Nov 2017 07:01:26 PM UTC, comment #9: The ncurses patch should be applied to Gentoo's ncurses, so that all Gentoo users get the fix.
|
Benno Schulenberg <bens> |
Wed 08 Nov 2017 12:37:44 AM UTC, comment #8: No need for an ncurses bug report, it was fixed two years ago.
|
Brand Huntsman <brand> |
Tue 07 Nov 2017 04:58:17 PM UTC, comment #7: Ah! Good hunting. So... a bug report to ncurses would be in order, no? |
Benno Schulenberg <bens> |
Tue 07 Nov 2017 08:42:25 AM UTC, comment #6: This bug and the musl bug might only be a problem in ncurses 6.0. I linked nano to ncurses 5.9 and both issues went away, works fine with wrefresh or wnoutrefresh. And the A_PROTECT patch below works fine with 5.9 and 6.0, so that is still an option. |
Brand Huntsman <brand> |
Tue 07 Nov 2017 05:17:43 AM UTC, comment #5: The issue with wnoutrefresh in titlebar() is not unique to musl, I experience it on Gentoo with glibc. Any non-bright titlebar colors cause rendering issues. Changing the wrefresh to wnoutrefresh at the bottom of winio.c:statusline() fixes the titlebar, until a buffer switch. The statusline() wnoutrefresh also fixes the syntax highlighting without needing the edit_refresh in prepare_for_display().
|
Brand Huntsman <brand> |
Sun 22 Oct 2017 07:43:32 PM UTC, comment #4: The commits you mention are not the cause of the miscolorings, they just expose an underlying bug. I was going to put money on it being an initialization failure somewhere in regcomp, but see below.
|
Benno Schulenberg <bens> |
Sat 21 Oct 2017 10:30:57 PM UTC, comment #3: Commit 3275c4e514d8bd634116cf57387af68cabe2ab68 is what broke syntax highlighting when switching buffers. Reverting edit_refresh() at bottom of files.c:prepare_for_display() fixes the issue in buffers. Reverting the commit in the other comment is also required. |
Brand Huntsman <brand> |
Sat 21 Oct 2017 10:41:55 AM UTC, comment #2: Reverting wrefresh() only works for the first buffer, the problem still happens when switching buffers. |
Brand Huntsman <brand> |
Sat 21 Oct 2017 09:56:20 AM UTC, comment #1: I have this problem on Gentoo Linux and commit b98545f4551937af0dfd6fd818df65161ffc10fe is the problem for me, but only for non-bright colors at head of file. Change cyan to brightcyan for ## comments in nanorc.nanorc and see if that fixes the issue on Haiku. Reverting wrefresh() at bottom of winio.c:titlebar() to wnoutrefresh() fixes the issue for me.
|
Brand Huntsman <brand> |
Sat 07 Oct 2017 01:37:44 PM UTC, original submission:
To reproduce, make sure that your ~/.nanorc includes the nanorc.nanorc syntax file. Then 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 |
---|---|---|---|---|---|
2017-11-19 | bens | Open/Closed | Open | Closed | |
2017-11-13 | bens | Status | In Progress | Fixed | |
2017-11-12 | bens | Attached File | - | Added 0001-painting-evade-an-ncurses-bug-by-adding-the-A_PROTEC.patch, #42375 | |
2017-11-12 | brand | Attached File | - | Added 0001-for-ncurses-6.0-before-patch-20151017.patch, #42370 | |
2017-11-11 | bens | Attached File | - | Added 0001-painting-evade-an-ncurses-bug-by-adding-the-A_PROTEC.patch, #42368 | |
2017-11-11 | bens | Status | None | In Progress | |
Assigned to | None | bens | |||
Summary | on Haiku, the first comments are uncolored at startup | on Haiku and Gentoo, the first comments are uncolored at startup | |||
2017-11-08 | brand | Attached File | - | Added ncurses-6.0-remove-an-early-return-from_nc_do_color.patch, #42345 | |
2017-11-07 | brand | Attached File | - | Added nano--fix-titlebar-and-syntax-highlighting-mis-coloring.patch, #42339 |
Powered by Savane 3.13-f8d8.
Corresponding source code
Fixed in git, e6a92b14.
I didn't expect any noticeable slowdown in screen painting, just a slight waste of CPU cycles by ncurses for doing a little bit extra.
Thanks for testing, and for the A_PROTECT idea.