aboutsummaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2016-03-28 22:56:05 +0200
committerThomas White <taw@bitwiz.org.uk>2016-03-28 22:56:05 +0200
commit87b72a15aaaceb1f0501cb9544a0a857648f7d20 (patch)
treedffd7cee7e036cb6aca46667b986c23278c834f5 /src/frame.c
parentfe17e48d6b5bb0e05cab77812b0e36f181666810 (diff)
A couple of cursor fixes
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index 16d272f..f71e764 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -570,7 +570,8 @@ int find_cursor(struct frame *fr, double x, double y,
/* Pretend it's in the last paragraph */
pos -= fr->paras[fr->n_paras-1]->height;
*ppara = fr->n_paras - 1;
- *ppos = text_para_pos(fr->paras[i], x - fr->pad_l, y - pos, ptrail);
+ *ppos = text_para_pos(fr->paras[fr->n_paras-1],
+ x - fr->pad_l, y - pos, ptrail);
return 0;
}