aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/editor.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/editor.py b/src/editor.py
index bc73348..44caac6 100644
--- a/src/editor.py
+++ b/src/editor.py
@@ -330,6 +330,7 @@ class TextArea():
self.mark, self.x, self.offx = None, 0, 0
else:
self.y = self.offy + self.height - 3
+ self.y = min(self.y, len(self.lines) - 1)
self.mark, self.x, self.offx = None, 0, 0
elif d == -3:
if self.x == 0: self.alert(_('At beginning'))