- 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
|
||||
- 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
|
||||
|
|
|
@ -4974,7 +4974,11 @@ int SynEdit::insertTextByNormalMode(const QString &Value)
|
|||
Start = 0;
|
||||
P = GetEOL(Value,Start);
|
||||
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);
|
||||
mLines->insertLines(caretY, CountLines(Value,P));
|
||||
} else {
|
||||
|
@ -4994,18 +4998,18 @@ int SynEdit::insertTextByNormalMode(const QString &Value)
|
|||
P = GetEOL(Value,Start);
|
||||
if (P == Start) {
|
||||
if (P<Value.length())
|
||||
Str = "";
|
||||
Str = GetLeftSpacing(calcIndentSpaces(caretY,"",true),true);
|
||||
else
|
||||
Str = sRightSide;
|
||||
} else {
|
||||
Str = Value.mid(Start, P-Start);
|
||||
if (P>=Value.length())
|
||||
Str += sRightSide;
|
||||
}
|
||||
if (mOptions.testFlag(eoAutoIndent)) {
|
||||
int indentSpaces = calcIndentSpaces(caretY,Str,true);
|
||||
Str = GetLeftSpacing(indentSpaces,true)+TrimLeft(Str);
|
||||
}
|
||||
}
|
||||
properSetLine(caretY - 1, Str);
|
||||
rescanRange(caretY);
|
||||
Result++;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <QStringList>
|
||||
|
||||
#define DEVCPP_VERSION "0.7.8"
|
||||
#define DEVCPP_VERSION "0.7.9"
|
||||
|
||||
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
|
@ -151,6 +151,8 @@ void SearchDialog::on_btnCancel_clicked()
|
|||
void SearchDialog::on_btnExecute_clicked()
|
||||
{
|
||||
int findCount = 0;
|
||||
ui->cbFind->addItem(ui->cbFind->currentText());
|
||||
ui->cbReplace->addItem(ui->cbReplace->currentText());
|
||||
|
||||
SearchAction actionType;
|
||||
switch (mTabBar->currentIndex()) {
|
||||
|
@ -279,7 +281,7 @@ void SearchDialog::on_btnExecute_clicked()
|
|||
PSearchResults results = pMainWindow->searchResultModel()->addSearchResults(
|
||||
keyword,
|
||||
mSearchOptions,
|
||||
SearchFileScope::openedFiles
|
||||
SearchFileScope::currentFile
|
||||
);
|
||||
Editor * e= pMainWindow->editorList()->getEditor();
|
||||
if (e!=nullptr) {
|
||||
|
@ -337,7 +339,6 @@ void SearchDialog::on_btnExecute_clicked()
|
|||
}
|
||||
pMainWindow->searchResultModel()->notifySearchResultsUpdated();
|
||||
}
|
||||
if (findCount>0)
|
||||
pMainWindow->showSearchPanel(actionType == SearchAction::ReplaceFiles);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -414,7 +414,8 @@ void SearchResultTreeViewDelegate::paint(QPainter *painter, const QStyleOptionVi
|
|||
|
||||
QString fullText;
|
||||
if (item->parent==nullptr) { //is filename
|
||||
fullText = item->filename;
|
||||
fullText = QString("%1(%2)").arg(item->filename)
|
||||
.arg(item->results.count());
|
||||
} else {
|
||||
fullText = QString("%1 %2: %3").arg(tr("Line")).arg(item->line)
|
||||
.arg(item->text);
|
||||
|
|
Loading…
Reference in New Issue