For future reference, you can repeat the command I gave you to generate more addresses should the same thing happen again. You can also use the following command to change your gap limit:
The gap limit is the number of addresses your wallet will generate from the last used address (or the number of addresses it will generate in total if it detects no used addresses). It sounds like the provider you used generated a bunch of addresses from your master public key which it never actually used, so by the time you reached an address you did use, it was beyond Electrum's gap limit and so the wallet did not detect it automatically until we forced it to generate 100 new addresses. The standard gap limit is 20 - the command above increases it to 50 (you could make this number 100 if you wanted, but the more addresses you generate the slower your wallet becomes so don't be tempted to generate thousands of addresses for no reason). By increasing it to 50 or 100, Electrum will automatically look for 50 or 100 addresses past the last one you used, rather than just 20, so it should prevent this from happening again in the future.
Running the above command also has the added benefit of removing the unsightly red background to the additional addresses we generated. The red background simply highlights that those addresses are beyond your current gap limit.