145 if count > 0: |
145 if count > 0: |
146 buffer += chunk.data[chunkOfs:chunkOfs + count] |
146 buffer += chunk.data[chunkOfs:chunkOfs + count] |
147 maxSize -= count |
147 maxSize -= count |
148 pos += count |
148 pos += count |
149 if highlighted is not None: |
149 if highlighted is not None: |
150 highlighted += \ |
150 highlighted += chunk.dataChanged[ |
151 chunk.dataChanged[chunkOfs:chunkOfs + count] |
151 chunkOfs:chunkOfs + count] |
152 |
152 |
153 if maxSize > 0 and pos < chunk.absPos: |
153 if maxSize > 0 and pos < chunk.absPos: |
154 # In this section, we read data from the original source. This |
154 # In this section, we read data from the original source. This |
155 # will only happen, when no copied data is available. |
155 # will only happen, when no copied data is available. |
156 if chunk.absPos - pos > maxSize: |
156 if chunk.absPos - pos > maxSize: |
415 insertIdx = 0 |
415 insertIdx = 0 |
416 ioDelta = 0 |
416 ioDelta = 0 |
417 |
417 |
418 for idx in range(len(self.__chunks)): |
418 for idx in range(len(self.__chunks)): |
419 chunk = self.__chunks[idx] |
419 chunk = self.__chunks[idx] |
420 if absPos >= chunk.absPos and \ |
420 if ( |
421 absPos < (chunk.absPos + len(chunk.data)): |
421 absPos >= chunk.absPos and |
|
422 absPos < (chunk.absPos + len(chunk.data)) |
|
423 ): |
422 foundIdx = idx |
424 foundIdx = idx |
423 break |
425 break |
424 |
426 |
425 if absPos < chunk.absPos: |
427 if absPos < chunk.absPos: |
426 insertIdx = idx |
428 insertIdx = idx |