The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.
Reviewed-by: mae
It now behaves less logical but closer to what vim does. Since
this is the main target group, the change is probably right.
In detail: Overwrite cursor no longer shows *what* will get overwritten,
but instead it simply indicates *that* the editor is in overwrite mode,
with a more or less fixed size (fixed when the font is truly monospace).
We now use two cursors, with the first one being positioned at the
character before the find scope starts. This makes it possible
to extend the scope when typing at the beginning or the end of
it. This is more what the user expects. The effect is noticable
with find&replace of words at the beginning or end of the scope.
If the foreground color for the disabled text is different than the normal
text foreground, that's an indication that the user wants the disabled
block to be colored differently. If so, disable the syntax highlighting
and set uniform colors for the block.
If the foreground colors are identical apply full syntax highlighting in
the disabled block too. Some people want that.
Reviewed-by: Thorbjørn Lindeijer
The generated HTML is not the prettiest HTML in the universe, but it
does the job. When copying code from Qt Creator to Microsoft Office or
OpenOffice.org, the syntax highlighting is now preserved. The code also
pastes as preformatted text.
Reviewed-by: mae
Task-number: QTCREATORBUG-727
On some desktop environments, dragging and dropping a file gives us
the url to the file in multiple mime types, including text/plain. This
causes the url to be inserted as text by default.
Work around this issue by explicitly ignoring drop events for the text
editor when they also come with urls.
Task-number: QTCREATORBUG-728
Reviewed-by: Friedemann Kleint
The smart backspace handling required a preceeding
non empty text block. In this case, the fix introduces
a standard backspace (deletePreviousCharacter).
Reviewed-by: dt
Depending on the XRender driver (probably), drawing a short straight
line can take quite a while when this line is transparent. On my
laptop's onboard ATI card, this meant that scrolling was unusably slow
when this transparent line was being drawn.
Fixed by avoiding the issue, since there is no actual need to use
transparency here. We can calculate the resulting color in advance
instead.
It was a bit confusing, since it reversed the order of the lines. When
this would be fixed, the added value of this action is very small, since
you can then also simply move your cursor one up before joining the
lines.