Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit b9faaaf

Browse files
author
mattpass
committed
Not skipping results when replacing now
1 parent 2a00f7e commit b9faaaf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

assets/js/icecoder.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -2971,7 +2971,12 @@ var ICEcoder = {
29712971
rExpMatch0String = rData.rExpMatch0String;
29722972

29732973
// Increment findResult one more if our selection is what we want to find and we want to find next
2974-
if (find.toLowerCase() === thisSelection.toLowerCase() && false === findPrevious) {
2974+
// but we're not replacing (replacing removes from array so should not increment thru array index also)
2975+
if (
2976+
find.toLowerCase() === thisSelection.toLowerCase() &&
2977+
false === findPrevious &&
2978+
(t['and'] !== document.findAndReplace.connector.value || false === canActionChanges)
2979+
) {
29752980
this.findResult++;
29762981
}
29772982

0 commit comments

Comments
 (0)