bugGNU nano - Bugs: bug #45640, multiline regexes sometimes see a...

 
 

bug #45640: multiline regexes sometimes see a start as an end

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Mon 27 Jul 2015 06:05:00 PM UTC  
 
Severity: 3 - NormalStatus: 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.

 

Sat 01 Aug 2015 08:49:53 AM UTC, comment #2:

Fixed in SVN, r5335.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 27 Jul 2015 08:30:38 PM UTC, comment #1:

I don't get it, but attached patch fixes it. It even fixes a ^K mistakenly colouring lots of lines red. Great!

Maybe the oring doesn't work because the default value for multidata is not 0 but -1? Or maybe it doesn't get initialized and contains random data? Probably then also the other ORs should become plain assignments.

In theory a line could be marked with a combination of CBEGINBEFORE, CSTARTENDHERE and CENDAFTER. The precalcalculation seems to do this, or intends to do this. But the actual winio painting code only sets a single value, and that seems to work fine. So...

(file #34541)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 27 Jul 2015 06:05:00 PM UTC, original submission:

Add the following two lines at the end of your .nanorc:

syntax "tough"
color red start="\"" end="\""

Then start nano with:

stty rows 25 && src/nano -x -Y tough +23 NEWS

See how the lines with "lizf" and "Ashley" are coloured in the inverse manner of what is intended. Weird.

Now do ^Y and see how the "lizf" line is now coloured correctly. And when doing several ^Vs, also all the other lines are now coloured correctly.

Why does nano get it wrong at startup? Surely the precalculation must have matched up all the double quotes correctly. Why then does the painting code go wrong? It should simply follow the precalculated stuff, then it can't go wrong.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Submitted the item)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Dec 2015 03:16:18 PM UTCbensOpen/ClosedOpen=>Closed
    Sat 01 Aug 2015 08:49:53 AM UTCbensStatusIn Progress=>Fixed
    Mon 27 Jul 2015 08:30:38 PM UTCbensAttached File-=>Added set-it-instead-of-oring.patch, #34541
      StatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1