Skip to content
Snippets Groups Projects
Commit 67bbce79 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed problem with indentation when auto-indent is turned off

When auto-indent is turned off, Qt Creator uses a simplistic approach of
copying the indentation string from the previous line. This was broken
when the cursor was positioned inside the indentation, since this caused
part of the indentation to go to the next line, which was then prepended
with the copied indentation, in effect increasing the indentation for
each new line.

The solution here was to copy the indentation from the previous block
only after inserting the new block, which causes the indentation of the
previous line to be cut off by exactly the right amount to keep the
indentation constant.

Task-number: QTCREATORBUG-396
Reviewed-by: mae
parent cc6c543a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment