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 11 Feb 2014 06:20:56 PM UTC  
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 Markup)

You are not logged in

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


Sat 01 Aug 2015 10:49:30 AM UTC, comment #5:

I have pushed an improved patch with changeset

Torsten <ttl>
Project Member
Tue 28 Jul 2015 05:07:43 AM UTC, 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 24 Jul 2015 06:16:46 AM UTC, 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 11 Feb 2014 06:59:18 PM UTC, 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 11 Feb 2014 06:22:25 PM UTC, 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 11 Feb 2014 06:20:56 PM UTC, original submission:

QScintilla offers setAutoIndent(), see:

Felipe G. Nievinski <fgnievinski>


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

Attach File(s):

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


Depends on the following items: None found

   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 12 Sep 2015 10:32:07 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Sat 12 Sep 2015 10:32:00 PM UTCmtmillerStatusReady For Test=>Fixed
    Sat 01 Aug 2015 10:49:30 AM UTCttlStatusNone=>Ready For Test
    Tue 28 Jul 2015 05:07:43 AM UTCttlAttached File-=>Added bug41554_v1.patch, #34546
    Fri 24 Jul 2015 06:16:46 AM UTCttlRelease3.8.0=>4.0.0
    Fri 24 Jul 2015 06:13:54 AM UTCttlDependencies-=>bugs #45534 is dependent

    Back to the top

    Powered by Savane 3.1-cleanup1