vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 75552c18f136dc7f8d25e57479adfe7ea28c0a33 parent 267135b35788a137fd76d551a1b9acf999f43d97 Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 30 Mar 2016 13:17:47 +0200 view: constify functions to manipulate selections Diffstat:
| M | view.c | | | 4 | ++-- |
| M | view.h | | | 4 | ++-- |
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/view.c b/view.c @@ -1348,7 +1348,7 @@ Filerange view_cursors_selection_get(Cursor *c) { return view_selections_get(c->sel); } -void view_cursors_selection_set(Cursor *c, Filerange *r) { +void view_cursors_selection_set(Cursor *c, const Filerange *r) { if (!text_range_valid(r)) return; if (!c->sel) @@ -1443,7 +1443,7 @@ Filerange view_selections_get(Selection *s) { return sel; } -void view_selections_set(Selection *s, Filerange *r) { +void view_selections_set(Selection *s, const Filerange *r) { if (!text_range_valid(r)) return; Text *txt = s->view->text; diff --git a/view.h b/view.h @@ -166,7 +166,7 @@ void view_cursors_selection_sync(Cursor*); void view_cursors_selection_restore(Cursor*); /* get/set the selected region associated with this cursor */ Filerange view_cursors_selection_get(Cursor*); -void view_cursors_selection_set(Cursor*, Filerange*); +void view_cursors_selection_set(Cursor*, const Filerange*); Selection *view_selections_new(View*); void view_selections_free(Selection*); @@ -176,7 +176,7 @@ Selection *view_selections(View*); Selection *view_selections_prev(Selection*); Selection *view_selections_next(Selection*); Filerange view_selections_get(Selection*); -void view_selections_set(Selection*, Filerange*); +void view_selections_set(Selection*, const Filerange*); Text *view_text(View*); /* get number of columns, that is maximal number of cursors on a line */