mirror of
https://github.com/Hopiu/micro.git
synced 2026-05-28 16:08:15 +00:00
exit conditional replace if no match is left
This commit is contained in:
parent
98b6f63b70
commit
fce5b81c22
1 changed files with 3 additions and 0 deletions
|
|
@ -291,6 +291,9 @@ func Replace(args []string) {
|
||||||
for {
|
for {
|
||||||
// The 'check' flag was used
|
// The 'check' flag was used
|
||||||
Search(search, view, true)
|
Search(search, view, true)
|
||||||
|
if !view.Cursor.HasSelection() {
|
||||||
|
break
|
||||||
|
}
|
||||||
view.Relocate()
|
view.Relocate()
|
||||||
if view.Buf.Settings["syntax"].(bool) {
|
if view.Buf.Settings["syntax"].(bool) {
|
||||||
view.matches = Match(view)
|
view.matches = Match(view)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue