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
In comments and strings, electric characters have no syntactical
significance and the unnecessary automatic reindent can be annoying.
Reviewed-by: Erik Verbruggen
While 2641496a99 removed the marks check entirely, a fix for the same
issue made on the master branch (1263babfc6) changed it to check
whether the line numbers are visible. This is more correct.
Reviewed-by: mae
The ProjectFilesEditor used for editing the generic project's files does
not show text marks, which broke the line select in the gutter.
Task-number: QTCREATORBUG-1238
Reviewed-by: mae
The new and cleaner foldingIndent in the block user data will
make it easier to support other kinds of indentation for various
other programming languages (like Python).
The find scope was sometimes painted incorrectly, and the last
line was occassionally ommited from the standard selection paint.
Reviewed-by: thorbjorn