Merge branch 'master' into gdbmi
This commit is contained in:
commit
d3abf822fb
12
NEWS.md
12
NEWS.md
|
@ -1,8 +1,20 @@
|
||||||
|
Version 0.9.3 For Dev-C++ 7 Beta
|
||||||
|
- fix: the count in the title of issues view isn't correct
|
||||||
|
- fix: columns calculation not correct when paint lines containing chinese characters
|
||||||
|
- fix: restore caret position after reformat code
|
||||||
|
- enhancement: ask user to rebuild project, when run/debug the project and it has been modified
|
||||||
|
- fix: correct set the enabled state of "delete line"/"insert line"/"delete word"/"delete to BOL"/"delete to EOL" menu items
|
||||||
|
- fix: undo "delete word"/"delete to BOL"/"delete to EOL" correct reset caret position
|
||||||
|
|
||||||
Version 0.9.2 For Dev-C++ 7 Beta
|
Version 0.9.2 For Dev-C++ 7 Beta
|
||||||
- fix: gutter of the disassembly code control in the cpu info dialog is grayed
|
- fix: gutter of the disassembly code control in the cpu info dialog is grayed
|
||||||
- fix: problem set & problem views not correctly hidden when disabled in the executor / problem set options
|
- fix: problem set & problem views not correctly hidden when disabled in the executor / problem set options
|
||||||
- fix: executor / problem set options not correctly saved
|
- fix: executor / problem set options not correctly saved
|
||||||
- fix: option "Move caret to the first non-space char in the current line when press HOME key" dosen't work fine.
|
- fix: option "Move caret to the first non-space char in the current line when press HOME key" dosen't work fine.
|
||||||
|
- fix: ctrl+left can't correctly move to the beginning of the last word
|
||||||
|
- enhancement: add "delete line"/"duplicate line"/"delete word"/"delete to EOL"/"delete to BOL" in the edit menu
|
||||||
|
- fix: crash when run "Project" / "Clean Make files"
|
||||||
|
- fix: when make project and del non-existing files, shouldn't show error messages
|
||||||
|
|
||||||
Version 0.9.1 For Dev-C++ 7 Beta
|
Version 0.9.1 For Dev-C++ 7 Beta
|
||||||
- enhancement: code completion suggestion for "__func__" variable
|
- enhancement: code completion suggestion for "__func__" variable
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -133,8 +133,8 @@ void CompilerManager::cleanProject(std::shared_ptr<Project> project)
|
||||||
mCompileIssueCount = 0;
|
mCompileIssueCount = 0;
|
||||||
ProjectCompiler* compiler = new ProjectCompiler(project,false,false);
|
ProjectCompiler* compiler = new ProjectCompiler(project,false,false);
|
||||||
compiler->setOnlyClean(true);
|
compiler->setOnlyClean(true);
|
||||||
mCompiler->setRebuild(false);
|
|
||||||
mCompiler = compiler;
|
mCompiler = compiler;
|
||||||
|
mCompiler->setRebuild(false);
|
||||||
connect(mCompiler, &Compiler::finished, mCompiler, &QObject::deleteLater);
|
connect(mCompiler, &Compiler::finished, mCompiler, &QObject::deleteLater);
|
||||||
connect(mCompiler, &Compiler::compileFinished, this, &CompilerManager::onCompileFinished);
|
connect(mCompiler, &Compiler::compileFinished, this, &CompilerManager::onCompileFinished);
|
||||||
|
|
||||||
|
@ -330,8 +330,9 @@ void CompilerManager::onSyntaxCheckIssue(PCompileIssue issue)
|
||||||
{
|
{
|
||||||
if (issue->type == CompileIssueType::Error)
|
if (issue->type == CompileIssueType::Error)
|
||||||
mSyntaxCheckErrorCount++;
|
mSyntaxCheckErrorCount++;
|
||||||
|
if (issue->type == CompileIssueType::Error ||
|
||||||
|
issue->type == CompileIssueType::Warning)
|
||||||
mSyntaxCheckIssueCount++;
|
mSyntaxCheckIssueCount++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CompilerManager::syntaxCheckIssueCount() const
|
int CompilerManager::syntaxCheckIssueCount() const
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
ProjectCompiler::ProjectCompiler(std::shared_ptr<Project> project, bool silent, bool onlyCheckSyntax):
|
ProjectCompiler::ProjectCompiler(std::shared_ptr<Project> project, bool silent, bool onlyCheckSyntax):
|
||||||
Compiler("",silent,onlyCheckSyntax)
|
Compiler("",silent,onlyCheckSyntax),
|
||||||
|
mOnlyClean(false)
|
||||||
{
|
{
|
||||||
setProject(project);
|
setProject(project);
|
||||||
}
|
}
|
||||||
|
@ -264,9 +265,9 @@ void ProjectCompiler::writeMakeClean(QFile &file)
|
||||||
{
|
{
|
||||||
writeln(file, "clean: clean-custom");
|
writeln(file, "clean: clean-custom");
|
||||||
if (mProject->options().type == ProjectType::DynamicLib)
|
if (mProject->options().type == ProjectType::DynamicLib)
|
||||||
writeln(file, "\t${RM} $(CLEANOBJ) $(BIN) $(DEF) $(STATIC)");
|
writeln(file, "\t${RM} $(CLEANOBJ) $(BIN) $(DEF) $(STATIC) > NUL 2>&1");
|
||||||
else
|
else
|
||||||
writeln(file, "\t${RM} $(CLEANOBJ) $(BIN)");
|
writeln(file, "\t${RM} $(CLEANOBJ) $(BIN) > NUL 2>&1");
|
||||||
writeln(file);
|
writeln(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +466,7 @@ bool ProjectCompiler::prepareForCompile()
|
||||||
mArguments = QString("-f \"%1\" clean").arg(extractRelativePath(
|
mArguments = QString("-f \"%1\" clean").arg(extractRelativePath(
|
||||||
mProject->directory(),
|
mProject->directory(),
|
||||||
mProject->makeFileName()));
|
mProject->makeFileName()));
|
||||||
} if (mRebuild) {
|
} else if (mRebuild) {
|
||||||
mArguments = QString("-f \"%1\" clean all").arg(extractRelativePath(
|
mArguments = QString("-f \"%1\" clean all").arg(extractRelativePath(
|
||||||
mProject->directory(),
|
mProject->directory(),
|
||||||
mProject->makeFileName()));
|
mProject->makeFileName()));
|
||||||
|
|
|
@ -876,7 +876,6 @@ void Editor::onPreparePaintHighlightToken(int line, int aChar, const QString &to
|
||||||
if (token.isEmpty())
|
if (token.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// qDebug()<<token<<"-"<<attr->name()<<" - "<<line<<" : "<<aChar;
|
|
||||||
if (mParser && highlighter() && (attr == highlighter()->identifierAttribute())) {
|
if (mParser && highlighter() && (attr == highlighter()->identifierAttribute())) {
|
||||||
BufferCoord p{aChar,line};
|
BufferCoord p{aChar,line};
|
||||||
BufferCoord pBeginPos,pEndPos;
|
BufferCoord pBeginPos,pEndPos;
|
||||||
|
@ -1593,6 +1592,36 @@ bool Editor::notParsed()
|
||||||
return mParser->findFileIncludes(mFilename)==nullptr;
|
return mParser->findFileIncludes(mFilename)==nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Editor::insertLine()
|
||||||
|
{
|
||||||
|
ExecuteCommand(SynEditorCommand::ecInsertLine,QChar(),nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Editor::deleteWord()
|
||||||
|
{
|
||||||
|
ExecuteCommand(SynEditorCommand::ecDeleteWord,QChar(),nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Editor::deleteLine()
|
||||||
|
{
|
||||||
|
ExecuteCommand(SynEditorCommand::ecDeleteLine,QChar(),nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Editor::duplicateLine()
|
||||||
|
{
|
||||||
|
ExecuteCommand(SynEditorCommand::ecDuplicateLine,QChar(),nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Editor::deleteToEOL()
|
||||||
|
{
|
||||||
|
ExecuteCommand(SynEditorCommand::ecDeleteEOL,QChar(),nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Editor::deleteToBOL()
|
||||||
|
{
|
||||||
|
ExecuteCommand(SynEditorCommand::ecDeleteBOL,QChar(),nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
QChar Editor::getCurrentChar()
|
QChar Editor::getCurrentChar()
|
||||||
{
|
{
|
||||||
if (lineText().length()<caretX())
|
if (lineText().length()<caretX())
|
||||||
|
@ -3539,6 +3568,8 @@ void Editor::reformat()
|
||||||
pSettings->dirs().app(),
|
pSettings->dirs().app(),
|
||||||
args,
|
args,
|
||||||
content);
|
content);
|
||||||
|
int oldTopLine = topLine();
|
||||||
|
BufferCoord mOldCaret = caretXY();
|
||||||
|
|
||||||
selectAll();
|
selectAll();
|
||||||
SynEditorOptions oldOptions = getOptions();
|
SynEditorOptions oldOptions = getOptions();
|
||||||
|
@ -3546,6 +3577,8 @@ void Editor::reformat()
|
||||||
newOptions.setFlag(SynEditorOption::eoAutoIndent,false);
|
newOptions.setFlag(SynEditorOption::eoAutoIndent,false);
|
||||||
setOptions(newOptions);
|
setOptions(newOptions);
|
||||||
setSelText(QString::fromUtf8(newContent));
|
setSelText(QString::fromUtf8(newContent));
|
||||||
|
setCaretXY(mOldCaret);
|
||||||
|
setTopLine(oldTopLine);
|
||||||
setOptions(oldOptions);
|
setOptions(oldOptions);
|
||||||
reparse();
|
reparse();
|
||||||
checkSyntaxInBack();
|
checkSyntaxInBack();
|
||||||
|
|
|
@ -168,6 +168,12 @@ public:
|
||||||
void exportAsHTML(const QString& htmlFilename);
|
void exportAsHTML(const QString& htmlFilename);
|
||||||
void resetBreakpoints();
|
void resetBreakpoints();
|
||||||
bool notParsed();
|
bool notParsed();
|
||||||
|
void insertLine();
|
||||||
|
void deleteWord();
|
||||||
|
void deleteLine();
|
||||||
|
void duplicateLine();
|
||||||
|
void deleteToEOL();
|
||||||
|
void deleteToBOL();
|
||||||
|
|
||||||
const PCppParser &parser();
|
const PCppParser &parser();
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,12 @@ void MainWindow::updateEditorActions()
|
||||||
ui->actionUnIndent->setEnabled(false);
|
ui->actionUnIndent->setEnabled(false);
|
||||||
ui->actionUndo->setEnabled(false);
|
ui->actionUndo->setEnabled(false);
|
||||||
ui->actionUnfoldAll->setEnabled(false);
|
ui->actionUnfoldAll->setEnabled(false);
|
||||||
|
ui->actionDelete_Line->setEnabled(false);
|
||||||
|
ui->actionDelete_Word->setEnabled(false);
|
||||||
|
ui->actionDuplicate_Line->setEnabled(false);
|
||||||
|
ui->actionDelete_to_BOL->setEnabled(false);
|
||||||
|
ui->actionDelete_to_EOL->setEnabled(false);
|
||||||
|
|
||||||
ui->actionFind->setEnabled(false);
|
ui->actionFind->setEnabled(false);
|
||||||
ui->actionReplace->setEnabled(false);
|
ui->actionReplace->setEnabled(false);
|
||||||
ui->actionFind_Next->setEnabled(false);
|
ui->actionFind_Next->setEnabled(false);
|
||||||
|
@ -379,6 +385,11 @@ void MainWindow::updateEditorActions()
|
||||||
ui->actionToggleComment->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
ui->actionToggleComment->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
ui->actionUnIndent->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
ui->actionUnIndent->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
ui->actionUnfoldAll->setEnabled(e->lines()->count()>0);
|
ui->actionUnfoldAll->setEnabled(e->lines()->count()>0);
|
||||||
|
ui->actionDelete_Line->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
|
ui->actionDelete_Word->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
|
ui->actionDuplicate_Line->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
|
ui->actionDelete_to_BOL->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
|
ui->actionDelete_to_EOL->setEnabled(!e->readOnly() && e->lines()->count()>0);
|
||||||
|
|
||||||
ui->actionFind->setEnabled(true);
|
ui->actionFind->setEnabled(true);
|
||||||
ui->actionReplace->setEnabled(true);
|
ui->actionReplace->setEnabled(true);
|
||||||
|
@ -1079,30 +1090,14 @@ void MainWindow::checkSyntaxInBack(Editor *e)
|
||||||
mCompilerManager->checkSyntax(e->filename(),e->text(),
|
mCompilerManager->checkSyntax(e->filename(),e->text(),
|
||||||
e->fileEncoding() == ENCODING_ASCII, nullptr);
|
e->fileEncoding() == ENCODING_ASCII, nullptr);
|
||||||
}
|
}
|
||||||
// if not PrepareForCompile(cttStdin,True) then begin
|
|
||||||
// fCheckSyntaxInBack:=False;
|
|
||||||
// Exit;
|
|
||||||
// end;
|
|
||||||
// if e.InProject then begin
|
|
||||||
// if not assigned(MainForm.fProject) then
|
|
||||||
// Exit;
|
|
||||||
// fSyntaxChecker.Project := MainForm.fProject;
|
|
||||||
// end;
|
|
||||||
// fSyntaxChecker.CheckSyntax(True);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::compile(bool rebuild)
|
bool MainWindow::compile(bool rebuild)
|
||||||
{
|
{
|
||||||
CompileTarget target =getCompileTarget();
|
CompileTarget target =getCompileTarget();
|
||||||
if (target == CompileTarget::Project) {
|
if (target == CompileTarget::Project) {
|
||||||
if (!mProject->saveUnits())
|
if (mProject->modified())
|
||||||
return false;
|
mProject->saveAll();
|
||||||
// Check if saves have been succesful
|
|
||||||
for (int i=0; i<mEditorList->pageCount();i++) {
|
|
||||||
Editor * e= (*(mEditorList))[i];
|
|
||||||
if (e->inProject() && e->modified())
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
clearIssues();
|
clearIssues();
|
||||||
|
|
||||||
// Increment build number automagically
|
// Increment build number automagically
|
||||||
|
@ -1209,6 +1204,18 @@ void MainWindow::runExecutable(RunType runType)
|
||||||
{
|
{
|
||||||
CompileTarget target =getCompileTarget();
|
CompileTarget target =getCompileTarget();
|
||||||
if (target == CompileTarget::Project) {
|
if (target == CompileTarget::Project) {
|
||||||
|
if (mProject->modified() &&
|
||||||
|
QMessageBox::question(
|
||||||
|
this,
|
||||||
|
tr("Rebuild Project"),
|
||||||
|
tr("Project has been modified, do you want to rebuild it?")
|
||||||
|
) == QMessageBox::Yes) {
|
||||||
|
mProject->saveAll();
|
||||||
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
|
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunNormal;
|
||||||
|
compile();
|
||||||
|
return;
|
||||||
|
}
|
||||||
runExecutable(mProject->executable(),mProject->filename(),runType);
|
runExecutable(mProject->executable(),mProject->filename(),runType);
|
||||||
} else {
|
} else {
|
||||||
Editor * editor = mEditorList->getEditor();
|
Editor * editor = mEditorList->getEditor();
|
||||||
|
@ -1277,6 +1284,17 @@ void MainWindow::debug()
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mProject->modified() &&
|
||||||
|
QMessageBox::question(
|
||||||
|
this,
|
||||||
|
tr("Rebuild Project"),
|
||||||
|
tr("Project has been modified, do you want to rebuild it?")
|
||||||
|
) == QMessageBox::Yes) {
|
||||||
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
|
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
||||||
|
compile();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Did we choose a host application for our DLL?
|
// Did we choose a host application for our DLL?
|
||||||
if (mProject->options().type == ProjectType::DynamicLib) {
|
if (mProject->options().type == ProjectType::DynamicLib) {
|
||||||
if (mProject->options().hostApplication.isEmpty()) {
|
if (mProject->options().hostApplication.isEmpty()) {
|
||||||
|
@ -5692,3 +5710,46 @@ void MainWindow::on_actionProblem_triggered()
|
||||||
showHideMessagesTab(ui->tabProblem,state);
|
showHideMessagesTab(ui->tabProblem,state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionDelete_Line_triggered()
|
||||||
|
{
|
||||||
|
Editor *e=mEditorList->getEditor();
|
||||||
|
if (e) {
|
||||||
|
e->deleteLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionDuplicate_Line_triggered()
|
||||||
|
{
|
||||||
|
Editor *e=mEditorList->getEditor();
|
||||||
|
if (e) {
|
||||||
|
e->duplicateLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionDelete_Word_triggered()
|
||||||
|
{
|
||||||
|
Editor *e=mEditorList->getEditor();
|
||||||
|
if (e) {
|
||||||
|
e->deleteWord();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionDelete_to_EOL_triggered()
|
||||||
|
{
|
||||||
|
Editor *e=mEditorList->getEditor();
|
||||||
|
if (e) {
|
||||||
|
e->deleteToEOL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionDelete_to_BOL_triggered()
|
||||||
|
{
|
||||||
|
Editor *e=mEditorList->getEditor();
|
||||||
|
if (e) {
|
||||||
|
e->deleteToBOL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -518,6 +518,16 @@ private slots:
|
||||||
|
|
||||||
void on_actionProblem_triggered();
|
void on_actionProblem_triggered();
|
||||||
|
|
||||||
|
void on_actionDelete_Line_triggered();
|
||||||
|
|
||||||
|
void on_actionDuplicate_Line_triggered();
|
||||||
|
|
||||||
|
void on_actionDelete_Word_triggered();
|
||||||
|
|
||||||
|
void on_actionDelete_to_EOL_triggered();
|
||||||
|
|
||||||
|
void on_actionDelete_to_BOL_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
EditorList *mEditorList;
|
EditorList *mEditorList;
|
||||||
|
|
|
@ -506,7 +506,7 @@
|
||||||
<enum>QTabWidget::South</enum>
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>6</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -702,7 +702,7 @@
|
||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabDebugConsole">
|
<widget class="QWidget" name="tabDebugConsole">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -1381,7 +1381,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1114</width>
|
<width>1114</width>
|
||||||
<height>25</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -1449,6 +1449,12 @@
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionFoldAll"/>
|
<addaction name="actionFoldAll"/>
|
||||||
<addaction name="actionUnfoldAll"/>
|
<addaction name="actionUnfoldAll"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionDelete_Line"/>
|
||||||
|
<addaction name="actionDuplicate_Line"/>
|
||||||
|
<addaction name="actionDelete_Word"/>
|
||||||
|
<addaction name="actionDelete_to_BOL"/>
|
||||||
|
<addaction name="actionDelete_to_EOL"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuSearch">
|
<widget class="QMenu" name="menuSearch">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -2603,6 +2609,46 @@
|
||||||
<string>Problem</string>
|
<string>Problem</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDelete_Line">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete Line</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+D</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDuplicate_Line">
|
||||||
|
<property name="text">
|
||||||
|
<string>Duplicate Line</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+E</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDelete_Word">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete Word</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+Shift+D</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDelete_to_EOL">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete to EOL</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+Del</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDelete_to_BOL">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete to BOL</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+Backspace</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -219,11 +219,13 @@ void SynEditKeyStrokes::resetDefaults()
|
||||||
add(SynEditorCommand::ecCut, Qt::Key_X, Qt::ControlModifier);
|
add(SynEditorCommand::ecCut, Qt::Key_X, Qt::ControlModifier);
|
||||||
add(SynEditorCommand::ecBlockIndent, Qt::Key_I, Qt::ControlModifier|Qt::ShiftModifier);
|
add(SynEditorCommand::ecBlockIndent, Qt::Key_I, Qt::ControlModifier|Qt::ShiftModifier);
|
||||||
add(SynEditorCommand::ecBlockUnindent, Qt::Key_U, Qt::ControlModifier|Qt::ShiftModifier);
|
add(SynEditorCommand::ecBlockUnindent, Qt::Key_U, Qt::ControlModifier|Qt::ShiftModifier);
|
||||||
add(SynEditorCommand::ecLineBreak, Qt::Key_M, Qt::ControlModifier);
|
// add(SynEditorCommand::ecLineBreak, Qt::Key_M, Qt::ControlModifier);
|
||||||
add(SynEditorCommand::ecInsertLine, Qt::Key_N, Qt::ControlModifier);
|
// add(SynEditorCommand::ecInsertLine, Qt::Key_N, Qt::ControlModifier);
|
||||||
add(SynEditorCommand::ecDeleteWord, Qt::Key_T, Qt::ControlModifier);
|
// add(SynEditorCommand::ecDeleteWord, Qt::Key_T, Qt::ControlModifier);
|
||||||
add(SynEditorCommand::ecDeleteLine, Qt::Key_Y, Qt::ControlModifier);
|
// add(SynEditorCommand::ecDeleteLine, Qt::Key_Y, Qt::ControlModifier);
|
||||||
add(SynEditorCommand::ecDeleteEOL, Qt::Key_Y, Qt::ControlModifier|Qt::ShiftModifier);
|
// add(SynEditorCommand::ecDeleteEOL, Qt::Key_Y, Qt::ControlModifier|Qt::ShiftModifier);
|
||||||
|
// add(SynEditorCommand::ecDuplicateLine, Qt::Key_D, Qt::ControlModifier);
|
||||||
|
|
||||||
add(SynEditorCommand::ecUndo, Qt::Key_Z, Qt::ControlModifier);
|
add(SynEditorCommand::ecUndo, Qt::Key_Z, Qt::ControlModifier);
|
||||||
add(SynEditorCommand::ecRedo, Qt::Key_Z, Qt::ControlModifier|Qt::ShiftModifier);
|
add(SynEditorCommand::ecRedo, Qt::Key_Z, Qt::ControlModifier|Qt::ShiftModifier);
|
||||||
add(SynEditorCommand::ecGotoMarker0, Qt::Key_0, Qt::ControlModifier);
|
add(SynEditorCommand::ecGotoMarker0, Qt::Key_0, Qt::ControlModifier);
|
||||||
|
|
|
@ -250,6 +250,10 @@ void SynEdit::setCaretXYEx(bool CallEnsureCursorPos, BufferCoord value)
|
||||||
invalidateLine(mCaretY);
|
invalidateLine(mCaretY);
|
||||||
invalidateLine(oldCaretY);
|
invalidateLine(oldCaretY);
|
||||||
}
|
}
|
||||||
|
if (mGutter.activeLineTextColor().isValid()) {
|
||||||
|
invalidateGutterLine(mCaretY);
|
||||||
|
invalidateGutterLine(oldCaretY);
|
||||||
|
}
|
||||||
mStatusChanges.setFlag(SynStatusChange::scCaretY);
|
mStatusChanges.setFlag(SynStatusChange::scCaretY);
|
||||||
}
|
}
|
||||||
// Call UpdateLastCaretX before DecPaintLock because the event handler it
|
// Call UpdateLastCaretX before DecPaintLock because the event handler it
|
||||||
|
@ -829,7 +833,7 @@ int SynEdit::columnToChar(int aLine, int aColumn) const
|
||||||
|
|
||||||
int SynEdit::stringColumns(const QString &line, int colsBefore) const
|
int SynEdit::stringColumns(const QString &line, int colsBefore) const
|
||||||
{
|
{
|
||||||
int columns = colsBefore;
|
int columns = std::max(0,colsBefore);
|
||||||
int charCols;
|
int charCols;
|
||||||
for (int i=0;i<line.length();i++) {
|
for (int i=0;i<line.length();i++) {
|
||||||
QChar ch = line[i];
|
QChar ch = line[i];
|
||||||
|
@ -1375,7 +1379,7 @@ BufferCoord SynEdit::prevWordPosEx(const BufferCoord &XY)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if previous char is a "whitespace" search for the last IdentChar
|
// if previous char is a "whitespace" search for the last IdentChar
|
||||||
if (Line[CX - 2].isSpace())
|
if (!isWordChar(Line[CX - 2]))
|
||||||
CX = StrRScanForWordChar(Line, CX - 1);
|
CX = StrRScanForWordChar(Line, CX - 1);
|
||||||
if (CX > 0) // search for the first IdentChar of this "word"
|
if (CX > 0) // search for the first IdentChar of this "word"
|
||||||
CX = StrRScanForNonWordChar(Line, CX - 1)+1;
|
CX = StrRScanForNonWordChar(Line, CX - 1)+1;
|
||||||
|
@ -5242,13 +5246,18 @@ void SynEdit::deleteFromTo(const BufferCoord &start, const BufferCoord &end)
|
||||||
return;
|
return;
|
||||||
doOnPaintTransient(SynTransientType::ttBefore);
|
doOnPaintTransient(SynTransientType::ttBefore);
|
||||||
if ((start.Char != end.Char) || (start.Line != end.Line)) {
|
if ((start.Char != end.Char) || (start.Line != end.Line)) {
|
||||||
|
BufferCoord oldCaret = caretXY();
|
||||||
setBlockBegin(start);
|
setBlockBegin(start);
|
||||||
setBlockEnd(end);
|
setBlockEnd(end);
|
||||||
setActiveSelectionMode(SynSelectionMode::smNormal);
|
setActiveSelectionMode(SynSelectionMode::smNormal);
|
||||||
QString helper = selText();
|
QString helper = selText();
|
||||||
setSelTextPrimitive("");
|
setSelTextPrimitive("");
|
||||||
|
mUndoList->BeginBlock();
|
||||||
|
mUndoList->AddChange(SynChangeReason::crCaret, oldCaret, start,
|
||||||
|
"", SynSelectionMode::smNormal);
|
||||||
mUndoList->AddChange(SynChangeReason::crSilentDeleteAfterCursor, start, end,
|
mUndoList->AddChange(SynChangeReason::crSilentDeleteAfterCursor, start, end,
|
||||||
helper, SynSelectionMode::smNormal);
|
helper, SynSelectionMode::smNormal);
|
||||||
|
mUndoList->EndBlock();
|
||||||
internalSetCaretXY(start);
|
internalSetCaretXY(start);
|
||||||
}
|
}
|
||||||
doOnPaintTransient(SynTransientType::ttAfter);
|
doOnPaintTransient(SynTransientType::ttAfter);
|
||||||
|
@ -5436,6 +5445,8 @@ void SynEdit::ExecuteCommand(SynEditorCommand Command, QChar AChar, void *pData)
|
||||||
clearAll();
|
clearAll();
|
||||||
break;
|
break;
|
||||||
case SynEditorCommand::ecInsertLine:
|
case SynEditorCommand::ecInsertLine:
|
||||||
|
insertLine(Command == SynEditorCommand::ecInsertLine);
|
||||||
|
break;
|
||||||
case SynEditorCommand::ecLineBreak:
|
case SynEditorCommand::ecLineBreak:
|
||||||
insertLine(Command == SynEditorCommand::ecLineBreak);
|
insertLine(Command == SynEditorCommand::ecLineBreak);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -995,7 +995,7 @@ void SynEditTextPainter::PaintLines()
|
||||||
edit->mHighlighter->next();
|
edit->mHighlighter->next();
|
||||||
}
|
}
|
||||||
// Don't assume HL.GetTokenPos is valid after HL.GetEOL == True.
|
// Don't assume HL.GetTokenPos is valid after HL.GetEOL == True.
|
||||||
nTokenColumnsBefore += edit->stringColumns(sToken,nTokenColumnsBefore-1);
|
nTokenColumnsBefore += edit->stringColumns(sToken,nTokenColumnsBefore);
|
||||||
if (edit->mHighlighter->eol() && (nTokenColumnsBefore < vLastChar)) {
|
if (edit->mHighlighter->eol() && (nTokenColumnsBefore < vLastChar)) {
|
||||||
int lineColumns = edit->mLines->lineColumns(vLine-1);
|
int lineColumns = edit->mLines->lineColumns(vLine-1);
|
||||||
// Draw text that couldn't be parsed by the highlighter, if any.
|
// Draw text that couldn't be parsed by the highlighter, if any.
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#define DEVCPP_VERSION "beta.0.9.2"
|
#define DEVCPP_VERSION "beta.0.9.3"
|
||||||
|
|
||||||
#endif // VERSION_H
|
#endif // VERSION_H
|
||||||
|
|
Loading…
Reference in New Issue