Commit 16c2b91d authored by Kåre Särs's avatar Kåre Särs
Browse files

S&R: Make sure we first select the item to replace.

parent cb759994
......@@ -1388,6 +1388,9 @@ void KatePluginSearchView::replaceSingleMatch()
QModelIndex itemIndex = res->treeView->currentIndex();
if (!itemIndex.isValid() || !res->isMatch(itemIndex)) {
goToNextMatch();
// If no item was selected "Replace" is similar to just pressing "Next"
// We do not want to replace a string we do not see with plain "Replace"
return;
}
if (!m_mainWindow->activeView() || !m_mainWindow->activeView()->cursorPosition().isValid()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment