- fix: highlighter can't correctly find the end of ANSI C-style Comments

This commit is contained in:
royqh1979@gmail.com 2021-11-07 19:54:48 +08:00
parent cf14ca1777
commit b62c166638
4 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,6 @@
Version 0.8.2 For Dev-C++ 7 Beta
- fix: highlighter can't correctly find the end of ANSI C-style Comments
Version 0.8.1 For Dev-C++ 7 Beta Version 0.8.1 For Dev-C++ 7 Beta
- fix: ConsolePaurser.exe only exits when press ENTER - fix: ConsolePaurser.exe only exits when press ENTER
- fix: input/output/expected textedit in the problem view shouldn't autowrap lines - fix: input/output/expected textedit in the problem view shouldn't autowrap lines

View File

@ -216,10 +216,14 @@ void CompilerManager::run(const QString &filename, const QString &arguments, con
consoleFlag |= RPF_REDIRECT_INPUT; consoleFlag |= RPF_REDIRECT_INPUT;
if (pSettings->executor().pauseConsole()) if (pSettings->executor().pauseConsole())
consoleFlag |= RPF_PAUSE_CONSOLE; consoleFlag |= RPF_PAUSE_CONSOLE;
QString newArguments = QString(" %1 \"%2\" %3") if (consoleFlag!=0) {
.arg(consoleFlag) QString newArguments = QString(" %1 \"%2\" %3")
.arg(toLocalPath(filename)).arg(arguments); .arg(consoleFlag)
execRunner = new ExecutableRunner(includeTrailingPathDelimiter(pSettings->dirs().app())+"ConsolePauser.exe",newArguments,workDir); .arg(toLocalPath(filename)).arg(arguments);
execRunner = new ExecutableRunner(includeTrailingPathDelimiter(pSettings->dirs().app())+"ConsolePauser.exe",newArguments,workDir);
} else {
execRunner = new ExecutableRunner(filename,arguments,workDir);
}
execRunner->setStartConsole(true); execRunner->setStartConsole(true);
} else { } else {
execRunner = new ExecutableRunner(filename,arguments,workDir); execRunner = new ExecutableRunner(filename,arguments,workDir);

View File

@ -87,11 +87,9 @@ void ExecutableRunner::run()
[&](){ [&](){
errorOccurred= true; errorOccurred= true;
}); });
// qDebug() << mFilename; // if (!redirectInput()) {
// qDebug() << QProcess::splitCommand(mArguments); // process.closeWriteChannel();
if (!redirectInput()) { // }
process.closeWriteChannel();
}
process.start(); process.start();
process.waitForStarted(5000); process.waitForStarted(5000);
if (process.state()==QProcess::Running && redirectInput()) { if (process.state()==QProcess::Running && redirectInput()) {

View File

@ -313,6 +313,7 @@ void SynEditCppHighlighter::ansiCProc()
} else { } else {
mRange.state = RangeState::rsUnknown; mRange.state = RangeState::rsUnknown;
} }
finishProcess = true;
} else } else
mRun+=1; mRun+=1;
break; break;