aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/view.c b/view.c
index d681656..db9a8a6 100644
--- a/view.c
+++ b/view.c
@@ -664,7 +664,7 @@ bool view_viewport_up(View *view, int n) {
} while (text_iterator_byte_prev(&it, &c));
if (c == '\r')
off++;
- view->start -= off;
+ view->start -= MIN(view->start, off);
view_draw(view);
return true;
}