aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/view.c b/view.c
index f2a0c90..d79e42b 100644
--- a/view.c
+++ b/view.c
@@ -1262,6 +1262,11 @@ size_t view_cursors_pos(Cursor *c) {
return text_mark_get(c->view->text, c->mark);
}
+size_t view_cursors_line(Cursor *c) {
+ size_t pos = view_cursors_pos(c);
+ return text_lineno_by_pos(c->view->text, pos);
+}
+
int view_cursors_cell_get(Cursor *c) {
return c->line ? c->col : -1;
}