bugGNU nano - Bugs: bug #41908, first line of first comment block...

 
 

bug #41908: first line of first comment block in C file is not highlighted

Submitted by:  None
Submitted on:  Wed 19 Mar 2014 04:32:39 PM UTC  
 
Severity: 2 - MinorStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 10 Nov 2015 10:41:08 AM UTC, comment #8:

It depended on uninitialized data, so it would vary from situation to situattion.

It should be fixed in SVN, r5398.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 18 Jul 2015 08:20:21 AM UTC, comment #7:

No, it's not yet fixed, it just happens a bit less often.

Does anyone still see this with compilers later than 4.7.2?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 18 Jul 2015 07:55:24 AM UTC, comment #6:

I think this has been fixed with the fixing of bug #45525. Version 2.4.3 should no longer exhibit this minor discolouring.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 02 Apr 2015 09:30:31 AM UTC, comment #5:

It depends on the compiler. I don't see it with 4.4.3. But it is there with 4.7.2, even with -O2.

Could anyone affected try patch file #29172 and see if this fixes it, and if you notice any adverse effects?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 02 Apr 2015 08:39:55 AM UTC, comment #4:

I don't see this, not in current SVN, not even with -O0. If you still see this, what compilation flags and compiler are you using?

Your "solution", Maxim, would colour the whole line even if there were just a short comment at the start of it. (Extremely unusual, but still, not good to put in an example file.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 08 Jul 2014 06:30:15 PM UTC, comment #3:

we can confirm this bug without recompile.
Add to /usr/share/nano/c.nanoarc one line:
color brightblue "/\*"

Maxim Baginskiy <kachan>
Sun 23 Mar 2014 08:01:43 PM UTC, comment #2:

Can you confirm that you compiled with -O0?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 19 Mar 2014 04:49:55 PM UTC, comment #1:

This is probably related to bug 41683 (I just noticed it)
https://savannah.gnu.org/bugs/index.php?41683

Anonymous
Wed 19 Mar 2014 04:32:39 PM UTC, original submission:

I can reproduce this bug on Arch linux; nano version: 2.2.6-2.

Steps:

1) enable syntax highlighting for C/C++ files in /etc/nanorc
2) save a file named "foo.c" containing:

/*
asd
*/

3) close and reopen the file
4) you should notice how the first line "/*" is not highlighted
5) press ARROW_DOWN and then ARROW_UP: the line becomes highlighted (so the bug vanishes)

This happens in both TTY and gnome-terminal

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kachan (Posted a comment)
  • -unavailable- added by bens (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Dec 2015 03:12:30 PM UTCbensOpen/ClosedOpen=>Closed
    Tue 10 Nov 2015 10:41:08 AM UTCbensStatusReady For Test=>Fixed
    Sat 18 Jul 2015 07:55:24 AM UTCbensSeverity3 - Normal=>2 - Minor
      StatusNeed Info=>Ready For Test
    Thu 02 Apr 2015 09:30:31 AM UTCbensSummaryC syntax highlighting is broken on comment block start=>first line of first comment block in C file is not highlighted
    Thu 02 Apr 2015 08:39:55 AM UTCbensStatusNone=>Need Info
    Sun 23 Mar 2014 08:01:43 PM UTCbensAssigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1