ITextMark is not abstract anymore and has an icon and a priority.
This means separate breakpoint and location marker classes that
are only "plain" marks with icons and priorities are not needed.
BaseTextMark directly inherits from ITextMark, instead of owning
an ITextMark derived InternalMark.
Also, there is now ITextMark::paint() to make it a bit more flexible
then icon()[->paint()]
Change the key binding for the copy line operation
introduced at 8ae4317394
to Ctrl+Ins. We already use Shift+Del for the cut line
operation, so this would be CUA consistent.
When only one line is selected when press the TAB key, should delete
the selected contents, then perform indent.
It like other more editor behavior.
Reviewer notes: Indeed this seems to be a common behavior in other
editors (for example Visual Studio, Code Blocks, Eclipse). But in
order to preserve the indentation consistent with the multiple-line
case it would be nice an approach like Eclipse's: If the single
line is completely selected, do the indentation as usual. Otherwise
remove the selected text.
The author of the request is not able to revise this minor change
because he claims to be busy (and actually asked for the help). So
I will keep this patch in the original state and implement the
detail I mentioned above in a following commit.
Merge-request: 252
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
For example when changing options in the git blame editor, the label
would resize since it took into account the block count, which is
temporarily 0 while the blame is calculated.
Done-with: Tobias Hunger
Extend text editor tooltips by a 'widget content', making
it possible to show any widget utilizing the fact that the
QTipLabel actually is a frame (and thus a container).
Introduce concept of 'interactive' tooltips and modify
the tooltip-closing mechanism such that simple interaction
is possible. Emit the base text editor's tooltip signals
with the correct position and add API to calculate the tooltip
position from the cursor position.
Add API for pinning tooltips to the text editor (by removing
them from the QTipLabel layout).
Modify the Debugger's tooltipmanager not to manage tooltips
under TextEditor control and to take over control only once
tooltips are pinned.
Rubber-stamped-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Introduce CompletionPolicy enum, use 'TextCompletion' for the new plain
text completion, and 'SemanticCompletion' or 'QuickFixCompletion' for
the existing cases.
Reviewed-by: Erik Verbruggen
Creator got a feature that pressing cursor keys without effect did not
clear the selection. E.g. Left at position 0, or End at the end of a
block. This was not in sync with other editors. Pressing the cursor keys
without selection modifier should ALWAYS clear the selection.
Task-number: QTCREATORBUG-3327
Since in the snippets overlay the selections are created with
ExpandBegin the interest is mostly in detecting when the first one
moved to the left (for example, when an undo is performed right
after inserting the snippet). However, this tracking doesn't need
to necessarily be associated with that flag.
This is basically a continuation of the commits which
refactor code out of the base text editor. For instance,
36fa1de4c6 and
3a684586fa.
Also removed the doXXXX() forwarding methods.
Use the editor's displayName for the window title.
Also there were missing change signal emissions in setDisplayName
implementations.
Moves the actual handling of the window title from Session to
EditorManager (so it now is also done for the hypothetical case of no
project explorer plugin).
Task-number: QTCREATORBUG-3207
QFontMetricsF::averageCharWidth seems to always return a fractional size
(at least on Linux/GNOME with DejaVu Mono), even when the font is not
actually drawn at sub-pixels. This caused the visible wrap column to
appear in the wrong place.
As a workaround, use the width of the character 'x', which is pretty
average and does align to pixels when needed.
Task-number: QTCREATORBUG-2746
Reviewed-by: con
Block highlights should still be visible even outside the margin (when
margins are displayed naturally), since it acts only as indicator of
the character limit.
Apparently this had already been noticed before and recently there was
a merge request (no. 204) with an attempt to fix it. However, the
implementation was not handling it in a nice form. This is a small
patch that solves the issue and keeps the editor beautiful. (Check
the merge request for more details.)
Reviewed-by: Thorbjorn Lindeijer
It was being reset based on the highlighter definitions.
Consider some refactoring with the related options as well to avoid
overriding user's settings.
Done-with: Thorbjorn Lindeijer
Fix small issue with forward movement, and overwrite deleting to start
or end of word (normally Ctrl+Delete and Ctrl+Backspace)
Reviewed-by: Erik Verbruggen
This is pretty much a complement of commit 3a684586fa,
which is an attempt to make editors and indenters a bit more decoupled.
Reviewed-by: Thorbjorn Lindeijer
- Unexport Core::Internal::MainWindow and remove its includes.
- Move RssFetcher from Core::Internal to Core.
- Unexport CopyTaskHandler.
- Move TextEditor's completion support and Refactor Overlay
helper classes from TextEditor::Internal to TextEditor as they
are exported.
- Move internal BaseTextBlockSelection into private header.
- Unexport TextEditorOverlay as they are not used.
This caused it to go to 0 when for example displaying size 9 at 10%,
which is an invalid value so it caused the text to revert back to the
default size.
It also caused zooming to sometimes appearing to have no effect. For
example zooming size 9 to 110% would still yield size 9 rather than 9.9.
Task-number: QTCREATORBUG-2744
Task-number: QTCREATORBUG-2745
Reviewed-by: Robert Loehning
Reviewed-by: hjk