Neopixel Painter - Need to change few lines. Not sure where to start
I think you need something like this.

  for(;;) {
    while(!(TIFR1 &amp; _BV(TOV1)));               // Wait for Timer1 overflow
    TIFR1 |= _BV(TOV1);                        // Clear overflow bit

    show();                                    // Display current line

    if(++block &gt;= nBlocks) {                   // Past last block?
      block = 0;                               // Loop back to start
    }

    if(digitalRead(NEXT_PIN_OR_SOMETHING) == LOW) {       // Next button pressed
      break; // Break out of for-loop
    }


    card.readBlock(block + firstBlock, sdBuf); // Load next pixel row
  }