bugGNU Octave - Bugs: bug #41554, GUI Editor could offer auto/smart...

 
 

bug #41554: GUI Editor could offer auto/smart indentation

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Tue Feb 11 18:20:56 2014  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat Aug 1 10:49:30 2015, comment #5:

I have pushed an improved patch with changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/046904b54dc4

Torsten <ttl>
Project Member
Tue Jul 28 05:07:43 2015, comment #4:

I have attached a patch that implements a first version of "smart" indentation (in addition to scintilla's auto indentation) for testing.

(file #34546)

Torsten <ttl>
Project Member
Fri Jul 24 06:16:46 2015, comment #3:

Bug #45534 marked as duplicate of this bug. Original comment from Tim:

In the editor if you type 'for' followed by the enter key, it won't indent the caret one level like you'd expect.

It should ideally indent the caret, and also out-dent when you type a block-finishing keyword like 'end'. That is what the Matlab editor does and it works very well.

Torsten <ttl>
Project Member
Tue Feb 11 18:59:18 2014, comment #2:

setAutoIndent () is already used and there is a user preference in the settings dialog for it. The only effect that this has is that a the following line is indented like the actual line when hitting return. Automatically Indenting lines after an if-statement or in similar case is obviously not supported by the lexer provided by qscintilla.

I have tested with geany (which is also using scintilla) with same results.

Torsten <ttl>
Project Member
Tue Feb 11 18:22:25 2014, comment #1:

looks like it's mostly okay; only a minor tweak is necessary:

after hitting enter at the end of the second endif, it should be de-indented one level.

Felipe G. Nievinski <fgnievinski>
Tue Feb 11 18:20:56 2014, original submission:

QScintilla offers setAutoIndent(), see:
<http://pyqt.sourceforge.net/Docs/QScintilla2/classQsciScintilla.html#a7b5f937cf4094e73918e8cda32511f8d>

Felipe G. Nievinski <fgnievinski>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34546:  bug41554_v1.patch added by ttl (3kB - text/x-diff)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by fgnievinski (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 project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Sep 12 22:32:07 2015mtmillerOpen/ClosedOpen=>Closed
    Sat Sep 12 22:32:00 2015mtmillerStatusReady For Test=>Fixed
    Sat Aug 1 10:49:30 2015ttlStatusNone=>Ready For Test
      Release4.0.0=>dev
    Tue Jul 28 05:07:43 2015ttlAttached File-=>Added bug41554_v1.patch, #34546
    Fri Jul 24 06:16:46 2015ttlRelease3.8.0=>4.0.0
    Fri Jul 24 06:13:54 2015ttlDependencies-=>bugs #45534 is dependent

    Back to the top


    Powered by Savane 3.1-cleanup