macro_recorder: don't crash trying to move line out-of-bounds
parent
05483f6f03
commit
f64a068f4b
|
|
@ -241,6 +241,8 @@ class MacroRecorder(BasicEditor):
|
|||
if offset == 0:
|
||||
return
|
||||
index = self.lines.index(obj)
|
||||
if index + offset < 0 or index + offset >= len(self.lines):
|
||||
return
|
||||
other = self.lines.index(self.lines[index + offset])
|
||||
self.lines[index].remove()
|
||||
self.lines[other].remove()
|
||||
|
|
|
|||
Loading…
Reference in New Issue