- fix: "tab to spaces" option in the editor general options widget doesn't work
This commit is contained in:
parent
33099f4044
commit
2ceb95e4cc
2
NEWS.md
2
NEWS.md
|
@ -1,5 +1,7 @@
|
|||
Version 0.7.4
|
||||
- fix: when debug a project, and have breakpoints that not in opened editors, dev-cpp will crash
|
||||
- fix: when a file is parsing in background, exit dev-cpp will crash
|
||||
- fix: "tab to spaces" option in the editor general options widget doesn't work
|
||||
|
||||
Version 0.7.3
|
||||
- enhancement: icons in project view
|
||||
|
|
|
@ -32,6 +32,7 @@ CppParser::CppParser(QObject *parent) : QObject(parent)
|
|||
mIsHeader = false;
|
||||
mIsProjectFile = false;
|
||||
|
||||
mCppKeywords = CppKeywords;
|
||||
//mNamespaces;
|
||||
//mBlockBeginSkips;
|
||||
//mBlockEndSkips;
|
||||
|
@ -1289,7 +1290,7 @@ bool CppParser::checkForForBlock()
|
|||
|
||||
bool CppParser::checkForKeyword()
|
||||
{
|
||||
SkipType st = CppKeywords.value(mTokenizer[mIndex]->text,SkipType::skNone);
|
||||
SkipType st = mCppKeywords.value(mTokenizer[mIndex]->text,SkipType::skNone);
|
||||
return st!=SkipType::skNone;
|
||||
}
|
||||
|
||||
|
@ -1960,7 +1961,7 @@ void CppParser::handleForBlock()
|
|||
void CppParser::handleKeyword()
|
||||
{
|
||||
// Skip
|
||||
SkipType skipType = CppKeywords.value(mTokenizer[mIndex]->text,SkipType::skNone);
|
||||
SkipType skipType = mCppKeywords.value(mTokenizer[mIndex]->text,SkipType::skNone);
|
||||
switch (skipType) {
|
||||
case SkipType::skItself:
|
||||
// skip it;
|
||||
|
|
|
@ -369,6 +369,7 @@ private:
|
|||
|
||||
QRecursiveMutex mMutex;
|
||||
GetFileStreamCallBack mOnGetFileStream;
|
||||
QMap<QString,SkipType> mCppKeywords;
|
||||
};
|
||||
using PCppParser = std::shared_ptr<CppParser>;
|
||||
|
||||
|
|
|
@ -1987,7 +1987,7 @@ void SynEdit::insertLine(bool moveCaret)
|
|||
BackCounter--;
|
||||
}
|
||||
}
|
||||
mLines->insert(mCaretY - 1, "");
|
||||
mLines->insert(mCaretY - 1, GetLeftSpacing(SpaceCount2,true));
|
||||
nLinesInserted++;
|
||||
mUndoList->AddChange(SynChangeReason::crLineBreak, caretXY(), caretXY(), "",
|
||||
SynSelectionMode::smNormal);
|
||||
|
|
|
@ -40,7 +40,7 @@ void EditorGeneralWidget::doLoad()
|
|||
//indents
|
||||
ui->chkAddIndent->setChecked(pSettings->editor().addIndent());
|
||||
ui->chkAutoIndent->setChecked(pSettings->editor().autoIndent());
|
||||
ui->chkTabToSpaces->setChecked(pSettings->editor().autoIndent());
|
||||
ui->chkTabToSpaces->setChecked(pSettings->editor().tabToSpaces());
|
||||
ui->spTabWidth->setValue(pSettings->editor().tabWidth());
|
||||
ui->chkShowIndentLines->setChecked(pSettings->editor().showIndentLines());
|
||||
ui->colorIndentLine->setColor(pSettings->editor().indentLineColor());
|
||||
|
@ -72,7 +72,7 @@ void EditorGeneralWidget::doSave()
|
|||
//indents
|
||||
pSettings->editor().setAddIndent(ui->chkAddIndent->isChecked());
|
||||
pSettings->editor().setAutoIndent(ui->chkAutoIndent->isChecked());
|
||||
pSettings->editor().setAutoIndent(ui->chkTabToSpaces->isChecked());
|
||||
pSettings->editor().setTabToSpaces(ui->chkTabToSpaces->isChecked());
|
||||
pSettings->editor().setTabWidth(ui->spTabWidth->value());
|
||||
pSettings->editor().setShowIndentLines(ui->chkShowIndentLines->isChecked());
|
||||
pSettings->editor().setIndentLineColor(ui->colorIndentLine->color());
|
||||
|
|
Loading…
Reference in New Issue