icecoder / ICEcoder

Browser code editor awesomeness
http://icecoder.net
Other
1.41k stars 348 forks source link

Seems to skip over the next result? (Only when going to next result, not back result) #991

Closed mattpass closed 2 years ago

mattpass commented 2 years ago

Describe the bug Perform a find & replace on next result and it will skip over every other result. It appears to work fine when going to previous result, just not next result.

To Reproduce Steps to reproduce the behavior:

  1. Open a doc with lots of xyz text
  2. Find xyz and select replace with abc text
  3. Click next result link >> and it will replace, but every other one, seems to skip
  4. The the prev result link << and it will replace without skipping

Expected behavior Not to skip results when replacing.

mattpass commented 2 years ago

Fixed, was incrementing array index as well as replacing so moving on twice (deletion + move) not just deletion.