Before, the selection was required to span multiple lines. Now, any
selection will trigger the line indenting functionality of
Tab/Shift+Tab. This should lead to less surprises.
Also, Shift+Tab will now always unindent the current line, even if there
is no selection, since there is nothing else sensible for this shortcut
to do.
Task-number: QTCREATORBUG-414
Reviewed-by: mae
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
The extra area only updated the current *line* when the cursor moved, not
the entire paragraph. This left bold line numbers behind. The fix adds
the required update region when the cursor position changes blocks.
This is necessary since a recent change in Qt 4.6 to how the
WaveUnderline is drawn. It makes sure the WaveUnderline repeats
correctly from one text item to another.
Reviewed-by: mae
Creator only indents the first line, and reindents subsequent lines relative
to the indentation change of said first line. This fails when the first line
contains no non-space characters. Solution in this change: skip (visually) empty
lines.
Reviewed-by: thorbjorn
Task-number: QTCREATORBUG-227
Only checking Ctrl and link availability on mouse release was triggering
the navigation too easily.
Now you have to press and release the mouse on the same link, having
Ctrl pressed all the time. In addition, when changing the text selection
the link is also cleared.
Task-number: QTCREATORBUG-134
Reviewed-by: con
at a later stage we will look into harmonizing context menu among different editors.
The cpp editor had the biggest need, because its context menu features all sorts of
extra refactoring operations, thus the standard Qt context menu became too large.
auto-indentation of pasted text now only happens when complete
lines including a trailing paragraph separator are copied and pasted.
In addition, the reindent() functions ensures that the relative indentation
within the pasted block is preserved. This mechanism is now also used for
moving lines up/down.
Done with thorbjorn
We now exclude brace in ifdefed out sections when calculating,
whether or not the braces match. This requires adjust the brace
levels whenever sections get ifdef'd out or ifdef'd in again.
- when doing backspace, preserve the previous indentation litterally
- when having auto-indentation turned off, simply repeat the previous
indentation litterally instead of jumping to 0