diff --git a/application.py b/application.py index bd41ed4..c84ff7e 100755 --- a/application.py +++ b/application.py @@ -562,7 +562,8 @@ class Application(object): if p.y == y and p.x >= x and p.x < x + swidth: (vy, vx) = (slot.y_offset + count, p.x - x + w.mode.lmargin) break - if x + swidth >= len(w.buffer.lines[y]): + + if y >= len(w.buffer.lines) or x + swidth >= len(w.buffer.lines[y]): x = 0 y += 1 else: