- fix: find in the current file is not correcly saved in the search history
- fix: hit info not correctly displayed in the search result view - fix: If find in files found no hits, search result view will not be shown. - fix: wront indents when paste one line content
This commit is contained in:
parent
c64c4916ac
commit
3352d413b3
6
NEWS.md
6
NEWS.md
|
@ -1,3 +1,9 @@
|
||||||
|
Version 0.7.9
|
||||||
|
- fix: find in the current file is not correcly saved in the search history
|
||||||
|
- fix: hit info not correctly displayed in the search result view
|
||||||
|
- fix: If find in files found no hits, search result view will not be shown.
|
||||||
|
- fix: wront indents when paste one line content
|
||||||
|
|
||||||
Version 0.7.8
|
Version 0.7.8
|
||||||
- enhancement: In problem view's output control, indicates which line is different with the expected
|
- enhancement: In problem view's output control, indicates which line is different with the expected
|
||||||
- fix: current input/expected not correctly applied when save/run problem cases
|
- fix: current input/expected not correctly applied when save/run problem cases
|
||||||
|
|
|
@ -4974,7 +4974,11 @@ int SynEdit::insertTextByNormalMode(const QString &Value)
|
||||||
Start = 0;
|
Start = 0;
|
||||||
P = GetEOL(Value,Start);
|
P = GetEOL(Value,Start);
|
||||||
if (P<Value.length()) {
|
if (P<Value.length()) {
|
||||||
Str = sLeftSide + TrimLeft(Value.mid(0, P - Start));
|
QString s = TrimLeft(Value.mid(0, P - Start));
|
||||||
|
if (sLeftSide.isEmpty()) {
|
||||||
|
sLeftSide = GetLeftSpacing(calcIndentSpaces(caretY,s,true),true);
|
||||||
|
}
|
||||||
|
Str = sLeftSide + s;
|
||||||
properSetLine(caretY - 1, Str);
|
properSetLine(caretY - 1, Str);
|
||||||
mLines->insertLines(caretY, CountLines(Value,P));
|
mLines->insertLines(caretY, CountLines(Value,P));
|
||||||
} else {
|
} else {
|
||||||
|
@ -4994,17 +4998,17 @@ int SynEdit::insertTextByNormalMode(const QString &Value)
|
||||||
P = GetEOL(Value,Start);
|
P = GetEOL(Value,Start);
|
||||||
if (P == Start) {
|
if (P == Start) {
|
||||||
if (P<Value.length())
|
if (P<Value.length())
|
||||||
Str = "";
|
Str = GetLeftSpacing(calcIndentSpaces(caretY,"",true),true);
|
||||||
else
|
else
|
||||||
Str = sRightSide;
|
Str = sRightSide;
|
||||||
} else {
|
} else {
|
||||||
Str = Value.mid(Start, P-Start);
|
Str = Value.mid(Start, P-Start);
|
||||||
if (P>=Value.length())
|
if (P>=Value.length())
|
||||||
Str += sRightSide;
|
Str += sRightSide;
|
||||||
}
|
if (mOptions.testFlag(eoAutoIndent)) {
|
||||||
if (mOptions.testFlag(eoAutoIndent)) {
|
int indentSpaces = calcIndentSpaces(caretY,Str,true);
|
||||||
int indentSpaces = calcIndentSpaces(caretY,Str,true);
|
Str = GetLeftSpacing(indentSpaces,true)+TrimLeft(Str);
|
||||||
Str = GetLeftSpacing(indentSpaces,true)+TrimLeft(Str);
|
}
|
||||||
}
|
}
|
||||||
properSetLine(caretY - 1, Str);
|
properSetLine(caretY - 1, Str);
|
||||||
rescanRange(caretY);
|
rescanRange(caretY);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#define DEVCPP_VERSION "0.7.8"
|
#define DEVCPP_VERSION "0.7.9"
|
||||||
|
|
||||||
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
|
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -151,6 +151,8 @@ void SearchDialog::on_btnCancel_clicked()
|
||||||
void SearchDialog::on_btnExecute_clicked()
|
void SearchDialog::on_btnExecute_clicked()
|
||||||
{
|
{
|
||||||
int findCount = 0;
|
int findCount = 0;
|
||||||
|
ui->cbFind->addItem(ui->cbFind->currentText());
|
||||||
|
ui->cbReplace->addItem(ui->cbReplace->currentText());
|
||||||
|
|
||||||
SearchAction actionType;
|
SearchAction actionType;
|
||||||
switch (mTabBar->currentIndex()) {
|
switch (mTabBar->currentIndex()) {
|
||||||
|
@ -279,7 +281,7 @@ void SearchDialog::on_btnExecute_clicked()
|
||||||
PSearchResults results = pMainWindow->searchResultModel()->addSearchResults(
|
PSearchResults results = pMainWindow->searchResultModel()->addSearchResults(
|
||||||
keyword,
|
keyword,
|
||||||
mSearchOptions,
|
mSearchOptions,
|
||||||
SearchFileScope::openedFiles
|
SearchFileScope::currentFile
|
||||||
);
|
);
|
||||||
Editor * e= pMainWindow->editorList()->getEditor();
|
Editor * e= pMainWindow->editorList()->getEditor();
|
||||||
if (e!=nullptr) {
|
if (e!=nullptr) {
|
||||||
|
@ -337,8 +339,7 @@ void SearchDialog::on_btnExecute_clicked()
|
||||||
}
|
}
|
||||||
pMainWindow->searchResultModel()->notifySearchResultsUpdated();
|
pMainWindow->searchResultModel()->notifySearchResultsUpdated();
|
||||||
}
|
}
|
||||||
if (findCount>0)
|
pMainWindow->showSearchPanel(actionType == SearchAction::ReplaceFiles);
|
||||||
pMainWindow->showSearchPanel(actionType == SearchAction::ReplaceFiles);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -414,7 +414,8 @@ void SearchResultTreeViewDelegate::paint(QPainter *painter, const QStyleOptionVi
|
||||||
|
|
||||||
QString fullText;
|
QString fullText;
|
||||||
if (item->parent==nullptr) { //is filename
|
if (item->parent==nullptr) { //is filename
|
||||||
fullText = item->filename;
|
fullText = QString("%1(%2)").arg(item->filename)
|
||||||
|
.arg(item->results.count());
|
||||||
} else {
|
} else {
|
||||||
fullText = QString("%1 %2: %3").arg(tr("Line")).arg(item->line)
|
fullText = QString("%1 %2: %3").arg(tr("Line")).arg(item->line)
|
||||||
.arg(item->text);
|
.arg(item->text);
|
||||||
|
|
Loading…
Reference in New Issue