Skip to content

Fixed a bug where indentation of curly-bracket was used instead of the line's indentation

Dimitrios Konstantos requested to merge vbrawl/gnome-builder:main into main

This merge request is made to fix a bug in the c-pack indenter where in the following example a non-valid indentation was placed.

int main() {
  {}
  return 0;
}

If we place a new line after {} the new line will be indented 13 spaces (length of "int main() " + 2 which is the default indentation) instead of just 2 (which should be basically 0 + 2 which is the default indentation)

An example with the spaces replaced by dashes -

int main() {
  {}
-------------
  return 0;
}

Merge request reports

Loading