bugGNU Octave - Bugs: bug #52659, end or endwhile of while statement...

 
 

bug #52659: end or endwhile of while statement misaligns code folding

Submitter:  Marshall <marsian>
Submitted:  Wed 13 Dec 2017 07:10:11 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lostbard
Originator Name:  Marsian Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Tue 02 Jan 2018 06:43:20 PM UTC, comment #3: 

And added patch to mxe.

http://hg.octave. ... /rev/9c7b4337da98

closing as fixed

John Donoghue <lostbard>
Group Member
Tue 02 Jan 2018 01:12:44 PM UTC, comment #2: 
John Donoghue <lostbard>
Group Member
Tue 02 Jan 2018 12:52:59 AM UTC, comment #1: 

Same as the previous bug, this is really a bug in scintilla not Octave, where it doesnt recognise while as a foldpoint keyword

I will create a patch to send on to scintilla and submit a bug there

John Donoghue <lostbard>
Group Member
Wed 13 Dec 2017 07:10:11 PM UTC, original submission:  

Code folding doesn't work right when there are while statements:


a = 1:5;
if true
    a(1:2)+=3;
    a(3:end)-=3;
    b = a;
    for i=1:3
        b+=1;
        while true
            a = 3;
        endwhile  %code fold matched with for

        if false
            b=3;
            b = a(end);
            q = b;
        endif
        a = 1;
    endfor%code fold matched with top if
    c+3;
endif
a = 1:5;
if true
    a(1:2)+=3;
endif


The wrong sections of code are folded in the case shown. I first mentioned this in bug #51321, and although that bug was fixed, this issue persists. This bug is also in the dev version.

Marshall <marsian>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by marsian (Submitted the item)
  •  

    Votes

    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.

    Only group members can vote.

     

    History

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-02 lostbard StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-01-02 lostbard Assigned toNone lostbard
    2018-01-02 lostbard StatusNone Confirmed

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code