- fix: syntax color of #include header filenames not correct

This commit is contained in:
Roy Qu 2022-03-12 21:42:32 +08:00
parent 35068cb3ed
commit 0286043cd7
3 changed files with 5 additions and 2 deletions

View File

@ -12,6 +12,7 @@ Red Panda C++ Version 1.0.0
- enhancement: clear infos in the status bar when editor closed
- fix: wrong selection when drag & dropped in editor
- enhancement: toggle block comment
- fix: syntax color of #include header filenames not correct
Red Panda C++ Version 0.14.5
- fix: the "gnu c++ 20" option in compiler set options is wrong

View File

@ -886,7 +886,9 @@ void Editor::onPreparePaintHighlightToken(int line, int aChar, const QString &to
if (token.isEmpty())
return;
if (mParser && highlighter() && (attr == highlighter()->identifierAttribute())) {
if (mParser && highlighter() && (attr == highlighter()->identifierAttribute())
&& !mParser->isIncludeLine(lines()->getString(line-1)) ) {
BufferCoord p{aChar,line};
// BufferCoord pBeginPos,pEndPos;
// QString s= getWordAtPosition(this,p, pBeginPos,pEndPos, WordPurpose::wpInformation);

View File

@ -72,7 +72,7 @@ void EditorMiscWidget::doSave()
pSettings->editor().setAutoDetectFileEncoding(ui->chkAutoDetectFileEncoding->isChecked());
if (ui->cbEncodingDetail->isVisible()) {
pSettings->editor().setDefaultEncoding(ui->cbEncodingDetail->currentData().toByteArray());
pSettings->editor().setDefaultEncoding(ui->cbEncodingDetail->currentText().toLocal8Bit());
} else {
pSettings->editor().setDefaultEncoding(ui->cbEncoding->currentData().toByteArray());
}