Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 4.7.0
-
None
-
-
76eba270bf54c2e5e52e327551da22faa2426f9a
Description
I've recently been doing some development in C in projects using linux kernel style which requires tabs for indenting and I've noticed one error in indentation for "hanging" indent.
I've created "kernel" style with:
- Tab policy: Mixed (can be also Tabs only - the same behaviour)
- Tab size & indent: 8
- Align continuation lines: with regular indent
and expected QtCreator to behave like: act as if indentation was with spaces but replace all leading 8 spaces with tab and if there is not enough spaces to replace them with tab then just leave them. And mostly it does behave like that apart from one notable case: hanging indent in continuation lines. Then it goes like: use indentation of previous line and add enough spaces to align as required e.g. I want this:
------->------->some_function(arg1, arg2, ------->------->-------> arg3, arg4);
but instead it is indented as:
------->------->some_function(arg1, arg2, ------->-------> arg3, arg4);
which causes my patches to fail to comply with policy and I have to manually edit every such place.
I am using FakeVim so I added it to components list but I expect it to just rely on the standard editor/cpp plugin.
I would really appreciate having this fixed.
Best regards
Andrzej
PS. Would it be possible to store the indentation style used in user project file description? When I'm switching between projects I have to manually switch the settings because they are global (and not remembered per project). And if not in per project file (if that creates problems when editing multiple projects at the same time) then maybe store this setting per session?
Attachments
For Gerrit Dashboard: QTCREATORBUG-20876 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
285498,3 | fakevim: fix indenting of continuation lines | 4.11 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |