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
While it was set to 2 for most editors, some editors, like the .pro file
editor, set another document on the BaseTextEditor, which then did not
get its cursor width set.
Also removed a duplicated line.
Reviewed-by: dt
The patch makes the editor leave block selection
mode when users continue to select text with
the keyboard. The editor will smoothly convert
to standard selection mode.
When the user moves a block up or down the text markers have to be
updated correctly.
This is done now in moveLineUpDown().
We check if a text marker is in the block that is about to be moved and
set the position of the QTextCursor to the correct value, afterwards.
Reviewed-by: mae
... on clicking stack frames or disassembler/
memory views.
Introduce flags to openEditorAt, pass
EditorManager::NoModeSwitch where applicable.
Task-number: QTCREATORBUG-2278
Due to the wrong enumerators being used, it was impossible to define
custom shortcuts for these actions.
Reviewed-by: mae
Task-number: QTCREATORBUG-2139
Use the defined foreground for search scope instead of calculating
something from background. Support empty foreground for the standard
selections (allows us to match certain popular colorschemes)
Block selection was "broken" when using tabs, or rather
incomplete: It treated tabs as normal characters, which
has shown to be unexpected by people using tabs in code.
The new implementation has a vastly improved find scope
as well. In addition, creating a blog selection with
mouse or keyboard feels a lot more solid now, as the
actual selection is detached from possible valid cursor
positions.
Task-number: QTCREATORBUG-1541
There should be no need for the text editor to request an update of the
completion box, since when it's there it will have focus and update
itself.
Reviewed-by: Roberto Raggi