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
in VCSBaseEditor and BaseTextEditor::createNew to the size
used for limiting file size.
Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
Task-number: QTCREATORBUG-1847
The lexer needs its own lexerState, before it was using
the syntax highlighter user state. This breaks the brace
depth calculation of the highlighter.
Reviewed-by: Roberto Raggi
Updating the text cursors that the extra selections are based on can
get quite slow if there are changes in a lot of positions - like when
reindenting a file.
Dropping some text cursors can increase performance significantly in
these cases.
Done-with: mae
See BaseTextEditor::setRefactorMarkers(...). The markers support
a clicked signal via BaseTextEditor and tooltips. They feature
a cursor, but are always positioned at the end of the line (not block!).
As special gimmick they do extend the document width when they
are positioned outside the document area.
The semantic highlighting and all the extra selections create
many cursors, this does cost time in setText().
Solution: remove all extra selections on reload.
Reviewed-by: Oswald Buddenhagen
Task-number: QTCREATORBUG-1720