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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Thu 26 Nov 2015 03:35:55 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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>
Group administrator
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>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-07 bens Open/ClosedOpen Closed
    2015-11-29 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code