Sat 09 Jan 2016 07:40:53 PM UTC, comment #9:
Fixed in SVN, r5538.
(The applied patch is fully different from the one posted before. See the new attachment.)
(file #35956)
|
Sun 19 Jul 2015 11:11:03 AM UTC, comment #8:
The basic problem is triggered when having a line like the following included in a syntax definition:
color red "^" "$"
The patch will fix this. But maybe nano should simply discard this absolute border case? As it should have been written as:
color red "^.*$"
|
Sat 22 Feb 2014 08:08:56 PM UTC, comment #7:
Could you try the patch (building nano from source) and report whether it then works for you with the complicated syntax?
|
Wed 18 Sep 2013 09:57:33 AM UTC, comment #6:
Attached patch fixes the problem for me. If you could try it, that would be nice. (It is just a temporary repair -- if it is the fully correct fix, then a pair of braces can be removed and a whole lot of text unindented.)
What remains, however, is that your original regexp is an absolute corner case, and kind of strange: it uses the multi-line matching syntax when all it wants to do is colour every line green. This one can also do with the single-line syntax I proposed: "^.*$".
Your multi-line variant is strange also in a second way: it doesn't actually match any characters. As soon it does, for example by adding a period after the ^ or before the $, also the unpatched nano does not hang any more. Using « color green start="^." end="$" » works fine here, patched and unpatched; the variant « color green start="^" end=".$" », however, does not colour everyhting green in the unpatched nano, but works fine in the patched version, just like your original very hungry regexp.
(file #29172)
|
Tue 17 Sep 2013 07:08:20 PM UTC, comment #5:
As I look again, I think this bug (bug #26977) is a duplicate of bug #29014: Failure to open when editing certain files named as PKGBUILD
|
Tue 17 Sep 2013 06:43:16 PM UTC, comment #4:
I think this bug (#26977) and bug #29014 are related.
bug #29014: Failure to open when editing certain files named as PKGBUILD
https://savannah.gnu.org/bugs/?29014
|
Tue 17 Sep 2013 06:32:42 PM UTC, comment #3:
I removed the problem line and added the line you had suggested. This works wonderfully. Thank you.
|
Sat 14 Sep 2013 08:37:30 AM UTC, comment #2:
The first time I tried this on your files, with debugging enabled, I got "match found at pos 70... end found on this line" rolling on and on over the screen. Subsequent runs, however, hung silently.
But why use the syntax «color green start="^" end="$"» to colour everything at first? When reworded as «color green "^.*$"», the colouring works fine.
|
Thu 23 Jul 2009 05:31:17 AM UTC, comment #1:
After having conferred with Those Who Know More, it has been determined that the title of this bug is misleading. It should read: "nano 2.1.9 freezes with PKGBUILD syntax highlighting".
Also, it has been discovered that if you comment out the first color line (green) in the nanorc, it works. I was unable to find any information on how to do syntax highlighting in nano. Maybe the end syntax has changed. Please let me know. Thanks.
|
Wed 08 Jul 2009 02:01:02 AM UTC, original submission:
Using nano 2.1.9, trying to open a PKGBUILD* with syntax highlighting, nano uses between 88 and 94 percent of my CPU. No file ever opens, and I have a completely blank terminal.
Perl, python and bash syntax files all open fine with syntax highlighting in 2.1.9.
2.0.9 used this syntax highlighting with no problems.
I have attached the pkgbuild.nanorc and a PKGBUILD for you to test.
*A PKGBUILD is an Arch Linux package making script.
|