forked from qt-creator/qt-creator
Editors: Continue refactoring indenters out of the editors.
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
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/tabsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/indenter.h>
|
||||
|
||||
#include <find/findplugin.h>
|
||||
#include <find/textfindconstants.h>
|
||||
@@ -935,7 +936,7 @@ void FakeVimPluginPrivate::checkForElectricCharacter(bool *result, QChar c)
|
||||
if (!handler)
|
||||
return;
|
||||
if (BaseTextEditor *bt = qobject_cast<BaseTextEditor *>(handler->widget()))
|
||||
*result = bt->isElectricCharacter(c);
|
||||
*result = bt->indenter()->isElectricCharacter(c);
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
|
||||
@@ -1132,7 +1133,7 @@ void FakeVimPluginPrivate::indentRegion(int beginLine, int endLine,
|
||||
while (!cursor.atBlockEnd())
|
||||
cursor.deleteChar();
|
||||
} else {
|
||||
bt->indentBlock(doc, block, typedChar);
|
||||
bt->indenter()->indentBlock(doc, block, typedChar, bt);
|
||||
}
|
||||
block = block.next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user