bugGNU Octave - Bugs: bug #56218, "indent code" handles...

 
 

bug #56218: "indent code" handles else keyword incorrectly

Submitter:  eflister <eflister>
Submitted:  Thu 25 Apr 2019 09:09:39 PM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  eflister Open/Closed:  * Closed
Release:  * 5.1.0 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 04 May 2019 03:09:11 PM UTC, comment #6: 

oops, sorry, definitely a dupe of 55276, please close

eflister <eflister>
Sat 04 May 2019 10:33:22 AM UTC, comment #5: 

This is probally a duplicate of #55276

John Donoghue <lostbard>
Group Member
Sat 04 May 2019 07:38:52 AM UTC, comment #4: 

@eflister: when saying "it gives you:", do you mean that this is already the result of "indent code" and the second example is the result of "indent code" when you apply it after having removed the "else"? If so, what was the text formatting before applying "indent code"?

Torsten Lilge <ttl>
Group Member
Sat 04 May 2019 07:05:42 AM UTC, comment #3: 

Yes, I tried on my Linux system with 5.1.0, but am not able to reproduce the removal of "else" by calling "indent code".  I tried your code with two, respective four spaces, real tabs, with and without newline at the end of file. Nothing results in removing the "else".  So please be very precise how to reproduce this:

- Is this the whole file or just a short excerpt?
- Is the whitespace spaces, tabs, newline at end of file?
- Where is your cursor when calling the tool?
- Did you highlight selected certain lines/all lines, when calling the tool?

Kai Torben Ohlhus <siko1056>
Group Member
Sat 04 May 2019 06:25:55 AM UTC, comment #2: 

yop.  did you try it?  i don't know what else to add?

eflister <eflister>
Fri 03 May 2019 07:39:03 PM UTC, comment #1: 

Thank you for your bug report.  I do not understand the problem and the steps to trigger that problem.  Can you be a bit more verbose about this?

Your input file consists of the first code listing and after calling  the "indent code" the output looks like the second listing?

Kai Torben Ohlhus <siko1056>
Group Member
Thu 25 Apr 2019 09:09:39 PM UTC, original submission:  

it gives you:

  if c
    else
    endif

but remove the else:

  if c
  endif


eflister <eflister>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by eflister (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.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-04 ttl StatusNeed Info Duplicate
        Open/ClosedOpen Closed
    2019-05-04 siko1056 Dependencies- Depends on bugs #55276
    2019-05-03 siko1056 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code