aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/view.c b/view.c
index a340293..2d82e2d 100644
--- a/view.c
+++ b/view.c
@@ -1091,6 +1091,17 @@ size_t view_cursors_pos(Cursor *c) {
return text_mark_get(c->view->text, c->mark);
}
+int view_cursors_cell_get(Cursor *c) {
+ return c->line ? c->col : -1;
+}
+
+int view_cursors_cell_set(Cursor *c, int cell) {
+ if (!c->line || cell < 0)
+ return -1;
+ cursor_set(c, c->line, cell);
+ return c->col;
+}
+
Register *view_cursors_register(Cursor *c) {
return &c->reg;
}