summaryrefslogtreecommitdiff
path: root/src/selectors.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-11-26 13:36:26 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-11-26 13:36:26 +0000
commitf66bbdf209b428aededcb36d2080d4cef86648ab (patch)
tree5d4f0564e4e8ad5af48d3d7c10d188e22f49057c /src/selectors.hh
parentbf7d3a4fec59cc17288fc7a673574aa66d08e0dc (diff)
select/split interpret count parameter as the capture group to use
count being 0 by default, we use the whole match, but we can now specify to use capture 1 with 1s<regex><ret>.
Diffstat (limited to 'src/selectors.hh')
-rw-r--r--src/selectors.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/selectors.hh b/src/selectors.hh
index 7809344f..fff025fc 100644
--- a/src/selectors.hh
+++ b/src/selectors.hh
@@ -292,8 +292,8 @@ Selection find_next_match(const Buffer& buffer, const Selection& sel, const Rege
return {begin.coord(), end.coord(), std::move(captures)};
}
-void select_all_matches(SelectionList& selections, const Regex& regex);
-void split_selections(SelectionList& selections, const Regex& separator_regex);
+void select_all_matches(SelectionList& selections, const Regex& regex, unsigned capture = 0);
+void split_selections(SelectionList& selections, const Regex& separator_regex, unsigned capture = 0);
struct MatchingPair { Codepoint opening, closing; };
Selection select_surrounding(const Buffer& buffer, const Selection& selection,