diff --git a/src/main/python/macro_recorder.py b/src/main/python/macro_recorder.py index 6cc6009..9a59a1d 100644 --- a/src/main/python/macro_recorder.py +++ b/src/main/python/macro_recorder.py @@ -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()