aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-07-26 16:42:50 +0200
committerMarc André Tanner <mat@brain-dump.org>2020-08-01 14:59:32 +0200
commit41b997f8b80cecda9b7b9c1cebc16d11fb25573d (patch)
tree9cb36ca2362b1d81ca1c1f64b82886952f15ae28
parentd6405056ab182e55ac554c9f45be0f169efb9bb1 (diff)
downloadvis-41b997f8b80cecda9b7b9c1cebc16d11fb25573d.tar.gz
vis-41b997f8b80cecda9b7b9c1cebc16d11fb25573d.tar.xz
vis: remove z- shorter pairwise selection combinator
-rw-r--r--config.def.h1
-rw-r--r--main.c17
-rw-r--r--man/vis.12
3 files changed, 0 insertions, 20 deletions
diff --git a/config.def.h b/config.def.h
index 7f992b2..c6eeb9e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -135,7 +135,6 @@ static const KeyBinding bindings_selections[] = {
{ "&", ACTION(SELECTIONS_INTERSECT) },
{ "~", ACTION(SELECTIONS_COMPLEMENT) },
{ "\\", ACTION(SELECTIONS_MINUS) },
- { "z-", ACTION(SELECTIONS_COMBINE_SHORTER) },
{ "z<", ACTION(SELECTIONS_COMBINE_LEFTMOST) },
{ "z>", ACTION(SELECTIONS_COMBINE_RIGHTMOST) },
{ "_", ACTION(SELECTIONS_TRIM) },
diff --git a/main.c b/main.c
index 93f13b7..40b3097 100644
--- a/main.c
+++ b/main.c
@@ -90,7 +90,6 @@ static const char *selections_complement(Vis*, const char *keys, const Arg *arg)
static const char *selections_minus(Vis*, const char *keys, const Arg *arg);
/* pairwise combine selections from mark */
static const char *selections_combine(Vis*, const char *keys, const Arg *arg);
-static Filerange combine_shorter(const Filerange*, const Filerange*);
static Filerange combine_leftmost(const Filerange*, const Filerange*);
static Filerange combine_rightmost(const Filerange*, const Filerange*);
/* adjust current used count according to keys */
@@ -288,7 +287,6 @@ enum {
VIS_ACTION_SELECTIONS_INTERSECT,
VIS_ACTION_SELECTIONS_COMPLEMENT,
VIS_ACTION_SELECTIONS_MINUS,
- VIS_ACTION_SELECTIONS_COMBINE_SHORTER,
VIS_ACTION_SELECTIONS_COMBINE_LEFTMOST,
VIS_ACTION_SELECTIONS_COMBINE_RIGHTMOST,
VIS_ACTION_TEXT_OBJECT_WORD_OUTER,
@@ -1035,11 +1033,6 @@ static const KeyAction vis_action[] = {
VIS_HELP("Subtract selections from mark")
selections_minus
},
- [VIS_ACTION_SELECTIONS_COMBINE_SHORTER] = {
- "vis-selections-combine-shorter",
- VIS_HELP("Pairwise combine: take shorter")
- selections_combine, { .combine = combine_shorter }
- },
[VIS_ACTION_SELECTIONS_COMBINE_LEFTMOST] = {
"vis-selections-combine-leftmost",
VIS_HELP("Pairwise combine: leftmost")
@@ -1804,16 +1797,6 @@ static const char *selections_minus(Vis *vis, const char *keys, const Arg *arg)
return keys;
}
-static Filerange combine_shorter(const Filerange *r1, const Filerange *r2) {
- if (!r1)
- return *r2;
- if (!r2)
- return *r1;
- size_t l1 = text_range_size(r1);
- size_t l2 = text_range_size(r2);
- return l1 < l2 ? *r1 : *r2;
-}
-
static Filerange combine_leftmost(const Filerange *r1, const Filerange *r2) {
if (!r1)
return *r2;
diff --git a/man/vis.1 b/man/vis.1
index 4c5dea3..e7c69fd 100644
--- a/man/vis.1
+++ b/man/vis.1
@@ -1162,8 +1162,6 @@ set intersection
set minus
.It Ic ~
set complement
-.It Ic z-
-pairwise combine, choose shorter
.It Ic z<
pairwise combine, choose leftmost
.It Ic z>