forked from qt-creator/qt-creator
Refactor: Get rid of BaseTextEditorWidget from Indenter
Provide directly TabSettings instead. This will be used for indenting a text for which there is no editor instance. Change-Id: Ia5f11a481f42464cf4820efdf2c7c4c32166f55e Reviewed-on: http://codereview.qt.nokia.com/2622 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -1673,7 +1673,6 @@ void FakeVimPluginPrivate::indentRegion(int beginLine, int endLine,
|
||||
tabSettings.m_indentSize = theFakeVimSetting(ConfigShiftWidth)->value().toInt();
|
||||
tabSettings.m_tabSize = theFakeVimSetting(ConfigTabStop)->value().toInt();
|
||||
tabSettings.m_spacesForTabs = theFakeVimSetting(ConfigExpandTab)->value().toBool();
|
||||
bt->setTabSettings(tabSettings);
|
||||
|
||||
QTextDocument *doc = bt->document();
|
||||
QTextBlock startBlock = doc->findBlockByNumber(beginLine);
|
||||
@@ -1690,12 +1689,10 @@ void FakeVimPluginPrivate::indentRegion(int beginLine, int endLine,
|
||||
while (!cursor.atBlockEnd())
|
||||
cursor.deleteChar();
|
||||
} else {
|
||||
bt->indenter()->indentBlock(doc, block, typedChar, bt);
|
||||
bt->indenter()->indentBlock(doc, block, typedChar, tabSettings);
|
||||
}
|
||||
block = block.next();
|
||||
}
|
||||
|
||||
bt->setTabSettings(oldTabSettings);
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::quitFakeVim()
|
||||
|
||||
Reference in New Issue
Block a user