bugGNU nano - Bugs: bug #46545, when a multiline regex becomes...

 
 

bug #46545: when a multiline regex becomes dismatched, it sometimes doesn't get rematched

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 26 Nov 2015 03:35:55 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.

 

Sun 29 Nov 2015 12:38:01 PM UTC, comment #1:

Fixed in SVN, r5451.

The fix seems unrelated to the problem, but... an end regex can make a zero-length match (as in the ChangeLog example), and then it is /as if/ the matching part is scrolled off to the left.

(I could have "fixed" it by just changing '<= startpos' to '< startpos'; I couldn't observe any ill effects. However, what went into SVN is the fully correct fix.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 26 Nov 2015 03:35:55 PM UTC, original submission:

What I mean is: when you hit Enter somewhere in a group of lines that are matched by a multiline regex, and this causes part of the group to (correctly) become uncoloured, then adding back characters that should cause the whole group to become coloured again, do /not/ have this effect.

To reproduce, compile nano with just --disable-libmagic. Don't use --enable-debug, because then the bug will be triggered always. Then run:

MALLOC_PERTURB_=0 src/nano +2,22 ChangeLog

Type: <Enter> <Enter> <Up> xxx.

After the second Enter, the "(do_redo)" correctly becomes uncoloured. But the xxx then do not restore the colour. However, when running:

MALLOC_PERTURB_=242 src/nano +2,22 ChangeLog

and typing the same, the colour /is/ restored.

I have a patch that fixes bug #46543, but it aggravates this bug, triggering it for all values of MALLOC_PERTURB_. That's not good. (So maybe the patch isn't a "fix", just an avoidance strategy -- the actual uninitialization isn't fixed.)

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:
   

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

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Dec 2015 03:19:47 PM UTCbensOpen/ClosedOpen=>Closed
    Sun 29 Nov 2015 12:38:01 PM UTCbensStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1