diff options
| author | Randy Palamar <randy@rnpnr.xyz> | 2025-01-12 00:21:18 -0700 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2025-01-12 00:21:18 -0700 |
| commit | 1b483c2cb47e2f64726e1bbb0923a4fa40ac8126 (patch) | |
| tree | cf52190dbe8a58633e1c074d3ee5f560c9d92e24 /main.c | |
| parent | 0f31ef53420b755c3978818bcd2e5a86e141413d (diff) | |
| download | vis-1b483c2cb47e2f64726e1bbb0923a4fa40ac8126.tar.gz vis-1b483c2cb47e2f64726e1bbb0923a4fa40ac8126.tar.xz | |
array: delete oneliners
same as buffer commit Array is completely visible
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1545,7 +1545,7 @@ static const char *selections_rotate(Vis *vis, const char *keys, const Arg *arg) if (next) line_next = text_lineno_by_pos(txt, view_cursors_pos(next)); if (!next || (columns > 1 && line != line_next)) { - size_t len = array_length(&arr); + size_t len = arr.len; size_t off = arg->i > 0 ? count % len : len - (count % len); for (size_t i = 0; i < len; i++) { size_t j = (i + off) % len; @@ -1714,7 +1714,7 @@ static const char *selections_intersect(Vis *vis, const char *keys, const Arg *a static void complement(Array *ret, Array *a, Filerange *universe) { size_t pos = universe->start; - for (size_t i = 0, len = array_length(a); i < len; i++) { + for (size_t i = 0, len = a->len; i < len; i++) { Filerange *r = array_get(a, i); if (pos < r->start) { Filerange new = text_range_new(pos, r->start); |
