https://bugs.kde.org/show_bug.cgi?id=375529

            Bug ID: 375529
           Summary: Indentation broken if automatic brackets is used
           Product: kate
           Version: 16.04
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: indentation
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: naker...@nakerium.com
  Target Milestone: ---

In c++, with automatic brackets on, indentation set to "C style" and using
tabs, when I write something that uses brackets (for example the body of an
if-case), the brackets go to wrong positions and the indentation is all bad.

For example (____ means tab, . means space, | is the caret position):

I have something like this:
int main()
{
____while(true)|
}

I press <enter> and go to the next line (as expected with the one extra
indentation more than the while line). Then, pressing the '{' key results in
this:

int main()
{
____while(true)
.{|}
}

Notice that the indentation is wrong and using a single space instead of a tab.
The cursor is inside the brackets, as expected.

If I press <enter> once again, I get this:

int main()
{
____while(true)
.{
____.|
}
}

That is: the first bracket has an space instead of a tab; the body part (where
the caret is) has a tab, as expected, but then a single space (instead of a
second tab); and the second bracket has no indentation at all.


I'm using kubuntu 16.04 but with a ppa to get stable kde backports and another
for kdevelop.
Kate says that it is version 16.04.3, using KDE Frameworks 5.28.0, Qt 5.6.1
(built against 5.6.1), and the xcb windowing system.
KDE Plasma Version is 5.8.5.
Qt Version is 5.6.1.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to