aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-12 18:27:30 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:43 +0200
commit742fb8b4c39d3278227a25ab7723c0f72bbca552 (patch)
tree4a4e50f4eeebc4348904e44df0a77f39329bc4d3
parenta91e705dfd9b7358bf24e02312dfb06ab3e6848d (diff)
downloadvis-742fb8b4c39d3278227a25ab7723c0f72bbca552.tar.gz
vis-742fb8b4c39d3278227a25ab7723c0f72bbca552.tar.xz
view: rename view_cursors_number
-rw-r--r--view.c2
-rw-r--r--view.h2
-rw-r--r--vis-lua.c4
-rw-r--r--vis.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/view.c b/view.c
index 938e75d..b33d4e7 100644
--- a/view.c
+++ b/view.c
@@ -941,7 +941,7 @@ int view_selections_count(View *view) {
return view->cursor_count;
}
-int view_cursors_number(Cursor *c) {
+int view_selections_number(Cursor *c) {
return c->number;
}
diff --git a/view.h b/view.h
index f725b88..8f6e1ca 100644
--- a/view.h
+++ b/view.h
@@ -166,7 +166,7 @@ int view_selections_count(View*);
* to remain the same.
* @endrst
*/
-int view_cursors_number(Cursor*);
+int view_selections_number(Cursor*);
/** Get maximal number of selections on a single line. */
int view_cursors_column_count(View*);
/**
diff --git a/vis-lua.c b/vis-lua.c
index a78a866..daf7d30 100644
--- a/vis-lua.c
+++ b/vis-lua.c
@@ -82,7 +82,7 @@ static void window_status_update(Vis *vis, Win *win) {
int cursor_count = view_selections_count(view);
if (cursor_count > 1) {
Cursor *c = view_selections_primary_get(view);
- int cursor_number = view_cursors_number(c) + 1;
+ int cursor_number = view_selections_number(c) + 1;
snprintf(right_parts[right_count], sizeof(right_parts[right_count])-1,
"%d/%d", cursor_number, cursor_count);
right_count++;
@@ -1859,7 +1859,7 @@ static int window_cursor_index(lua_State *L) {
}
if (strcmp(key, "number") == 0) {
- lua_pushunsigned(L, view_cursors_number(cur)+1);
+ lua_pushunsigned(L, view_selections_number(cur)+1);
return 1;
}
diff --git a/vis.c b/vis.c
index 2c72108..4aa7bd9 100644
--- a/vis.c
+++ b/vis.c
@@ -863,7 +863,7 @@ void vis_do(Vis *vis) {
.newpos = EPOS,
.range = text_range_empty(),
.reg = reg,
- .reg_slot = reg_slot == EPOS ? (size_t)view_cursors_number(cursor) : reg_slot,
+ .reg_slot = reg_slot == EPOS ? (size_t)view_selections_number(cursor) : reg_slot,
.linewise = linewise,
.arg = &a->arg,
.context = a->op ? a->op->context : NULL,