I read that but it doesn't have any specifcs. I'm asking about exact conditions that determine when recovery stops creating addresses but I guess I should just read the code as that's what we expect each user to do, right?
The help says: "The gap limit is the maximal number of contiguous unused addresses in your sequence of receiving addresses."
As a corrolary, the recovery stops when no more address can be extracted without violating this condition.
I am sorry if that is not clear for you. If you find a better way to explain it, in a reasonably concise manner, please make a constructive proposal.
Propolsal: Call it a buffer not a gap(makes significantly more sense to me to call it a buffer), and replace contiguous with a more simple "next"
"The buffer limit is the maximal number of next unused addresses in your predetermined sequence of receiving addresses created from your seed."
As a corrolary, the recovery stops when no more address can be extracted without violating this condition.
Hmm, I think "contiguous" is more appropriate than "next" here, although I am not a native speaker. Also, I think "gap" is better than "buffer", because it has nothing to do with "buffer" in the sense of "memory" or so...
Anyway, another text proposal from my side (albeit not quite as concise):
The gap limit "N_gap" is the maximal number of subsequent unused addresses showing up in your list of receiving addresses amongst the (infinite) sequence of addresses that is unequivocally defined by the seed of your wallet. Whenever one of these unused addresses becomes used (by receiving some funds), Electrum will make the next address in this sequence appear in the list of receiving addresses, such that always "N_gap" unused receiving addresses show up.
As a corrolary, the procedure of recovering your wallet from seed stops as soon as "N_gap" subsequent addresses are found that have not yet received any funds.
BTW: I have another proposal for Electrum's implementation of the "recovery from seed"-procedure in the first place:
Why not hard-coding a reasonably high number, like e.g. N_gap_default_recovery=[20], into Electrum's code, that implies that every wallet from seed recovery will always use this value of N_gap=[20] for the recovery procedure. If it doesn't find any used address in a sequence of [20] contiguous addresses, it stops the recovery process, and than in the receive address list of course it only displays as many addresses as specified in the user settings (e.g. N_gap=3 or whatever). Only if the user changes the value N_gap in the user settings to a higher value than this hard-coded value of [20], a warning message pops up that tells the user that he should remember this value in case he should later want to recover the wallet from seed and asks if the user really wants to set such an unusually high gap limit and knows what he is doing ("only for expert users..." or something...).
Upon recovery of the wallet from seed, there could be two buttons, called something like "recover from seed now" and "recover from seed with special gap limit". When clicking the second button, a new dialog asks for the gap_limit value (that the user then typically sets to a value > [20]) that the user wants to use for the wallet recovery procedure.
Why this? And why "20"? Because under normal circumstances a normal user probably never needs to set a gap limit > 20, but 20 is still low enough such that the wallet recovery procedure does not take overly long. Note that under normal usage, the user will anyway be 100 or more addresses down in the seed's sequence of addresses, so the wallet recovery procedure will not take significantly longer if the recovery procedure needs to check e.g. 170 addresses instead of only 150 addresses.
To summarize: With this modification the average user gains some comfort in terms of configuring the gap_limit within a reasonable range (1-20) without getting "bothered" with having to remember anything about the "gap_limit". Only very few expert users that need to use gap_limit values >20 (for whatever reason...) will need to care about it.
[off-topic: Another useful feature would be to sort the lists by address/by date/by label name/by balance/by nb of Tx/by flag/... upon clicking on the respective column heading - actually this is the only thing I missed in today's GUI - aside a comfortable GUI-based offline transaction concept à la Armory and GUI-based private key importing (e.g. for vanity-keys administered inside Electrum) or public-key-only-importing (e.g. for "watch-only"-wallets).]