#219 Wrong snippets indentation

closed-fixed
None
5
2008-11-04
2008-11-02
No

Geany SVN r3165

Snippets indentation is wrong if the line from where snippet completion start have any indentation character after the indentation.

Following examples use space indentation of two.

E.g. an else statement in a K&R-based style, the expected indentation can be the following:
__} else {
____
__}
but for now I get the following:
__} else {
_____
___}
because the space before 'else' is read as a part of the indentation.

Another example can be a language allowing class qualifiers such as "public" and a simple class snippet:
class=class %cursor%%block%
I expect the following when completing "public class":
public class
{
__
}
But I get the following:
public class
_{
___
_}

Discussion

  • Nick Treleaven
    Nick Treleaven
    2008-11-04

    • assigned_to: nobody --> ntrel
    • status: open --> closed-fixed
     
  • Nick Treleaven
    Nick Treleaven
    2008-11-04

    Thanks for reporting, now fixed in SVN. The bug also occurred with Smart Indent and maybe some other things like auto-table HTML completion.