aboutsummaryrefslogtreecommitdiff
path: root/src/wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrap.c')
-rw-r--r--src/wrap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wrap.c b/src/wrap.c
index f094672..01b9484 100644
--- a/src/wrap.c
+++ b/src/wrap.c
@@ -231,6 +231,8 @@ size_t find_cursor_pos(struct frame *fr, double xposd, double yposd)
int idx, trail;
int x_pos_i;
+ if ( fr->n_lines == 0 ) return 0;
+
l = find_cursor_line(fr, yposd, &end);
if ( end ) {