- enhancement: restore caret position after batch replace
This commit is contained in:
parent
d01a60e88f
commit
ef715b2c34
1
NEWS.md
1
NEWS.md
|
@ -3,6 +3,7 @@ Red Panda C++ Version 1.1.0
|
||||||
- enhancement: mark editor as modified, if the editing file is changed by other applications.
|
- enhancement: mark editor as modified, if the editing file is changed by other applications.
|
||||||
- enhancement: When the editing files is changed by other applications, only show one notification dialog for each file.
|
- enhancement: When the editing files is changed by other applications, only show one notification dialog for each file.
|
||||||
- fix: c files added to a project will be compiled as c++ file.
|
- fix: c files added to a project will be compiled as c++ file.
|
||||||
|
- enhancement: restore caret position after batch replace
|
||||||
|
|
||||||
Red Panda C++ Version 1.0.10
|
Red Panda C++ Version 1.0.10
|
||||||
- fix: modify watch doesn't work
|
- fix: modify watch doesn't work
|
||||||
|
|
|
@ -6489,8 +6489,14 @@ void MainWindow::on_btnReplace_clicked()
|
||||||
line.insert(item->start-1, newWord);
|
line.insert(item->start-1, newWord);
|
||||||
contents[item->line-1] = line;
|
contents[item->line-1] = line;
|
||||||
}
|
}
|
||||||
|
BufferCoord coord=editor->caretXY();
|
||||||
|
int topLine = editor->topLine();
|
||||||
|
int leftChar = editor->leftChar();
|
||||||
editor->selectAll();
|
editor->selectAll();
|
||||||
editor->setSelText(contents.join(editor->lineBreak()));
|
editor->setSelText(contents.join(editor->lineBreak()));
|
||||||
|
editor->setCaretXY(coord);
|
||||||
|
editor->setTopLine(topLine);
|
||||||
|
editor->setLeftChar(leftChar);
|
||||||
}
|
}
|
||||||
showSearchReplacePanel(false);
|
showSearchReplacePanel(false);
|
||||||
stretchMessagesPanel(false);
|
stretchMessagesPanel(false);
|
||||||
|
|
|
@ -858,7 +858,7 @@
|
||||||
<enum>QTabWidget::South</enum>
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>6</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
|
|
@ -903,6 +903,8 @@ void Project::saveOptions()
|
||||||
ini.SetLongValue("Project","SupportXPThemes", mOptions.supportXPThemes);
|
ini.SetLongValue("Project","SupportXPThemes", mOptions.supportXPThemes);
|
||||||
ini.SetLongValue("Project","CompilerSet", mOptions.compilerSet);
|
ini.SetLongValue("Project","CompilerSet", mOptions.compilerSet);
|
||||||
ini.SetLongValue("Project","CompilerSetType", mOptions.compilerSetType);
|
ini.SetLongValue("Project","CompilerSetType", mOptions.compilerSetType);
|
||||||
|
ini.Delete("Project","CompilerSettings"); // remove old compiler settings
|
||||||
|
ini.Delete("CompilerSettings",nullptr); // remove old compiler settings
|
||||||
foreach (const QString& key, mOptions.compilerOptions.keys()) {
|
foreach (const QString& key, mOptions.compilerOptions.keys()) {
|
||||||
ini.SetValue("CompilerSettings",toByteArray(key),toByteArray(mOptions.compilerOptions.value(key)));
|
ini.SetValue("CompilerSettings",toByteArray(key),toByteArray(mOptions.compilerOptions.value(key)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue