Skip to content

Commit

Permalink
vis: remove z+ longer pairwise selection combinator
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Aug 1, 2020
1 parent 1f9ae08 commit d640505
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ static const KeyBinding bindings_selections[] = {
{ "&", ACTION(SELECTIONS_INTERSECT) },
{ "~", ACTION(SELECTIONS_COMPLEMENT) },
{ "\\", ACTION(SELECTIONS_MINUS) },
{ "z+", ACTION(SELECTIONS_COMBINE_LONGER) },
{ "z-", ACTION(SELECTIONS_COMBINE_SHORTER) },
{ "z<", ACTION(SELECTIONS_COMBINE_LEFTMOST) },
{ "z>", ACTION(SELECTIONS_COMBINE_RIGHTMOST) },
Expand Down
17 changes: 0 additions & 17 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_longer(const Filerange*, const Filerange*);
static Filerange combine_shorter(const Filerange*, const Filerange*);
static Filerange combine_leftmost(const Filerange*, const Filerange*);
static Filerange combine_rightmost(const Filerange*, const Filerange*);
Expand Down Expand Up @@ -289,7 +288,6 @@ enum {
VIS_ACTION_SELECTIONS_INTERSECT,
VIS_ACTION_SELECTIONS_COMPLEMENT,
VIS_ACTION_SELECTIONS_MINUS,
VIS_ACTION_SELECTIONS_COMBINE_LONGER,
VIS_ACTION_SELECTIONS_COMBINE_SHORTER,
VIS_ACTION_SELECTIONS_COMBINE_LEFTMOST,
VIS_ACTION_SELECTIONS_COMBINE_RIGHTMOST,
Expand Down Expand Up @@ -1037,11 +1035,6 @@ static const KeyAction vis_action[] = {
VIS_HELP("Subtract selections from mark")
selections_minus
},
[VIS_ACTION_SELECTIONS_COMBINE_LONGER] = {
"vis-selections-combine-longer",
VIS_HELP("Pairwise combine: take longer")
selections_combine, { .combine = combine_longer }
},
[VIS_ACTION_SELECTIONS_COMBINE_SHORTER] = {
"vis-selections-combine-shorter",
VIS_HELP("Pairwise combine: take shorter")
Expand Down Expand Up @@ -1811,16 +1804,6 @@ static const char *selections_minus(Vis *vis, const char *keys, const Arg *arg)
return keys;
}

static Filerange combine_longer(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 ? *r2 : *r1;
}

static Filerange combine_shorter(const Filerange *r1, const Filerange *r2) {
if (!r1)
return *r2;
Expand Down
2 changes: 0 additions & 2 deletions man/vis.1
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,6 @@ set intersection
set minus
.It Ic ~
set complement
.It Ic z+
pairwise combine, choose longer
.It Ic z-
pairwise combine, choose shorter
.It Ic z<
Expand Down

0 comments on commit d640505

Please sign in to comment.