- 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 - 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 - fix: the "add bookmark" menu item is not correctly disabled on a bookmarked line
- enhancement: "use utf8 by default" in editor's misc setting - 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 Version 0.7.2
- fix: rainbow parenthesis stop functioning when change editor's general options - 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); pMainWindow->fileSystemWatcher()->removePath(mFilename);
if (pSettings->codeCompletion().enabled() && mParser) if (pSettings->codeCompletion().enabled() && mParser)
mParser->invalidateFile(mFilename); mParser->invalidateFile(mFilename);

View File

@ -1679,7 +1679,9 @@ void MainWindow::updateTools()
void MainWindow::newEditor() void MainWindow::newEditor()
{ {
try { 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(); editor->activate();
updateForEncodingInfo(); updateForEncodingInfo();
} catch (FileError e) { } catch (FileError e) {

View File

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

View File

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

View File

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