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
When automatic insertion of brackets is disabled in the completion
settings, it is reasonable to expect the automatic matching of brackets
is also disabled.
Task-number: QTCREATORBUG-454
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
The actions perform exactly like their counterparts in Eclipse: a new,
indented line is inserted above or below the current line and the text
cursor is moved to the start of the new line. The line where the cursor
was before the action was triggered remains unchanged.
The shortcuts are also like in Eclipse: "Ctrl+Shift+Return" inserts a
line above the current, "Shift+Return" inserts a line below the current.
Merge-request: 140
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
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.