- enhancement: "use utf8 by default" in editor's misc setting

This commit is contained in:
royqh1979 2021-10-24 15:17:31 +08:00
parent c7205f572e
commit 7d82f37462
6 changed files with 9 additions and 5 deletions

View File

@ -6,6 +6,7 @@ Version 0.7.3
- enhancement: open project file by drag it to the editor area
- fix: the "add bookmark" menu item is not correctly disabled on a bookmarked line
- enhancement: "use utf8 by default" in editor's misc setting
- fix: syntax issues not correctly cleared when the file was saved as another name.
Version 0.7.2
- fix: rainbow parenthesis stop functioning when change editor's general options

View File

@ -305,6 +305,7 @@ bool Editor::saveAs(const QString &name, bool fromProject){
}
}
clearSyntaxIssues();
pMainWindow->fileSystemWatcher()->removePath(mFilename);
if (pSettings->codeCompletion().enabled() && mParser)
mParser->invalidateFile(mFilename);

View File

@ -1679,7 +1679,9 @@ void MainWindow::updateTools()
void MainWindow::newEditor()
{
try {
Editor * editor=mEditorList->newEditor("",ENCODING_AUTO_DETECT,false,true);
Editor * editor=mEditorList->newEditor("",
pSettings->editor().useUTF8ByDefault()?ENCODING_UTF8:ENCODING_AUTO_DETECT,
false,true);
editor->activate();
updateForEncodingInfo();
} catch (FileError e) {

View File

@ -59,7 +59,7 @@ public:
int rightBraces(int Index);
int lengthOfLongestLine();
QString lineBreak() const;
const SynRangeState& ranges(int Index);
SynRangeState ranges(int Index);
void setRange(int Index, const SynRangeState& ARange, int leftBraces, int rightBraces);
QString getString(int Index);
int count();

View File

@ -479,8 +479,8 @@ void SynEditTextPainter::PaintHighlightToken(bool bFillToEOL)
} else {
bSel = bLineSelected;
bComplexToken = false;
// bU1 = false; // to shut up compiler warning.
// bU2 = false; // to shut up compiler warning.
bU1 = false; // to shut up compiler warning.
bU2 = false; // to shut up compiler warning.
}
// Any token chars accumulated?
if (TokenAccu.Columns > 0) {

View File

@ -3,7 +3,7 @@
#include <QStringList>
#define DEVCPP_VERSION "0.7.2"
#define DEVCPP_VERSION "0.7.3"
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
#ifdef Q_OS_WIN