Fix proposed by Alex Sokolov.
Task-number: QTCREATORBUG-12161
Change-Id: I1a7d4e9579dbb518970ea7bdb76a740e8e5d870d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Added an option to change the behavior of the debuggercore so that
the current editor isn't always centered on the current line, to stop
unnecessary jumping of the code.
Change-Id: I9406df518bb1b977e39a0265ee7fd6fae2069ed9
Reviewed-by: hjk <hjk121@nokiamail.com>
May happen when selecting a text in diff editor.
Change-Id: I2c4790c42c91623fc8b4cabef8a4604de9fd4cef
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
The logic behind the old code was that it was pointless to highlight
single characters, but it didn't explain why. This is useful for
searching for single character variable names, for instance.
Change-Id: Ic8cf60190c1a9caa1eb4441921e60f377fbee8d4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This patch implements two features:
1. Reimplement CopyLine to move text cursor at the beginning of line
2. Add copy/cutLine action to Advanced Edit menu, to make it
discoverable for editor users.
Change-Id: I0bf336ebee4dbf5afd2c759e47b1830271bd9d18
Reviewed-by: David Schulz <david.schulz@digia.com>
setPalette() does not replace the old one but rather adds the
difference. Thus a previous copy of the palette is unnecessary.
Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Generalizes the special handling of font settings, which should only be
applied (on the document) when an editor is or becomes visible.
Change-Id: Icd1e3ba4355e1ff4a837c9679b537cc3f5ed7ea9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Instead of once per editor.
Also remove a related unused function.
Change-Id: I4bcd86b9b0ec61b87500e546cf2138ec5d854561
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
And remove some unnecessary code in Python editor
Change-Id: I86cde74c244a16d1b36b0ac0e841ef8110ba832f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Lead to annoying behavior that pressing any disabled shortcut with control
modifier would lead to unwanted characters in the editor.
This reverts commit c1ff105a0c.
Change-Id: If61e52be9f11cabeafb46f5d71b901b4eab8e169
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
From the editor widget. Also name them autoIndent/autoReindent to
distinguish from the manual indent functions.
Change-Id: I4e1b9d503f53870b669fee66467e5e567eacefec
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
I couldn't find a situation where this code actually resulted in
performance improvement.
Change-Id: I7d905af36ef11dcba43030dc83670c3d1558f650
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Also when duplicating editors, we don't want to change the document
after construction. Actually at some places (e.g. CppEditorSupport
creation) we don't handle document changes correctly, and we are only
lucky that things still (more or less?) work. Get rid of
BaseTextEditorWidget::duplicateFrom and use copy-constructor style instead.
Change-Id: I7f688b7fcc51d1bb5e222bb333f0d28479b597a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
First step in never changing the text document after construction,
because that is actually not really supported.
Second step will be to fix that for the editor duplicate() methods too.
Change-Id: I3d112ba0895e7ee7ac6dd8ae2318f0de7d2cebc9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This patch also moves the showMargin and marginColumn settings into a
new settings class.
Change-Id: I676447be751c13ee438edc1e31e5998b999c6771
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
It was never called with a sensible value anyhow, and only complicates things.
Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
There is a 1-to-1 relationship between BaseTextDocument and QTextDocument,
so it doesn't make sense to do the setup between them in the editor widget.
Move creation of BaseTextDocumentLayout and setting up of 'changed' signal
to BaseTextDocument. This also avoids sending multiple
'changed' signals for a single QTextDocument::modificationChanged signal
in case of splits.
Change-Id: Iaab4fea594c5b50f502fd41c88948fac132de9f1
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Doesn't really make sense to have the additional IDocument *editorDocument()
method.
Change-Id: I0a7420eb1afaa76f63c3f7e9c4b373acf624ffb9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The actionHack was used to only forward actions to editors that "belong"
to that action handler instance. That is already clearly defined by the
context that the action handler is created for, so we can just use that
instead.
Change-Id: Ia4c6795c80bb281c1ed258324925f56ca7fd8150
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
And remove the indirection over BaseTextEditorWidget.
Change-Id: I2c570edf46b9ca72a11704ce27d8ae3f2218dcf0
Reviewed-by: David Schulz <david.schulz@digia.com>