Menu

#893 an indentation after second curly bracket if you click Enter

pending
nobody
General (289)
4
2012-10-13
2012-10-03
Anonymous
No

Hi Guys,
I think I find a bug.
example:
{|}

If you click Enter in "|", it'll be like this:
{
....}

I think it is supposed to be like this:
{
}

Or I'm wrong and you design this way?

Geany 0.21 in ubuntu 12.04
Regards,
Jesse

Discussion

  • Anonymous

    Anonymous - 2012-10-03
    • milestone: --> 3508874
    • priority: 5 --> 6
     
  • Colomban Wendling

    • milestone: 542693 -->
    • priority: 6 --> 4
     
  • Colomban Wendling

    Don't touch the group field thanks, we use it for the fixed-in-version information. And I don't think this issue deserves a priority of 6, it's not like a major issue.

    BTW, this is not "designed" to do so, but currently brace auto-indentation is quite naive, so simply adds one indentation level after a "{" and remove one when you type the "}" (but for close it can also match the opening one indentation)

     
  • Anonymous

    Anonymous - 2012-10-03

    that's so sad that I still need to remove the extra indentation.
    I just find the same problem in the V1.22.

    Will it be solved in the future?

     
  • Lex Trotman

    Lex Trotman - 2012-10-04

    As @colombanw said the current algorithm is "add an indent level if there is a { on the previous line"

    That is what it does.

    If you want an additional algorithm like "add an indent level if there is a { on the previous line except when ..." then please suggest an algorithm to fill in the ... but remember it has to work when typing as well.

     
  • Lex Trotman

    Lex Trotman - 2012-10-13
    • status: open --> pending
     

Log in to post a comment.