Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
16c2b91d
Commit
16c2b91d
authored
Feb 08, 2022
by
Kåre Särs
Browse files
S&R: Make sure we first select the item to replace.
parent
cb759994
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/search/plugin_search.cpp
View file @
16c2b91d
...
...
@@ -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
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment