Fix some cases of iteration over BufferLines (closes bgo#638314)
__getitem__ should raise an IndexError if an item beyond the last index is requested. Previously we did not do this, because we expect requests beyond the last line; specifically requests for (last line + 1). This patch changes our behaviour to correctly raise an IndexError if the request is for anything past (last line + 1). This fixes some cases of infinite iteration, as __iter__ wants to see that IndexError.
parent
63e38570
Please register or sign in to comment