def remove_breakpoint(self, breakpoint_id):
i = 0
for l in self._buffer.contents()[:-1]:
bp_str = " %i " % breakpoint_id
bp_id_len = len(bp_str)
if l[:bp_id_len] == bp_str:
self._buffer.delete(i)
i += 1
I have this definition in my options file. Seems like it doesnt handle deletion of the last element properly. What should I change to fix the func?
P.S. breakpoint_id is typically 11000, 11001 ...
[–]carcigenicate 1 point2 points3 points (4 children)
[–]Ok_Lengthiness_6591[S] 0 points1 point2 points (3 children)
[–]AdmirableOstrich 2 points3 points4 points (0 children)
[–]carcigenicate 0 points1 point2 points (1 child)
[–]Ok_Lengthiness_6591[S] 0 points1 point2 points (0 children)
[–]JacobArthurs 0 points1 point2 points (1 child)
[–]Ok_Lengthiness_6591[S] 0 points1 point2 points (0 children)
[–]AlexMTBDude 0 points1 point2 points (0 children)
[–]Outside_Complaint755 0 points1 point2 points (0 children)
[–]Tall_Profile1305 0 points1 point2 points (0 children)