summaryrefslogtreecommitdiff
path: root/src/selectors.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-05-12 23:25:15 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-05-13 20:09:06 +0100
commitea3e92aa5e68e73fa95196332b739891bbf3f24f (patch)
tree1b91673cdbec34a9dcb592858890fc6db1255ff9 /src/selectors.cc
parent7bc73b7ef9402f81a6bb496b03ba84197f76e642 (diff)
SelectionList know its buffer and timestamp
Diffstat (limited to 'src/selectors.cc')
-rw-r--r--src/selectors.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selectors.cc b/src/selectors.cc
index 5d98be52..40db98c9 100644
--- a/src/selectors.cc
+++ b/src/selectors.cc
@@ -431,13 +431,13 @@ Selection trim_partial_lines(const Buffer& buffer, const Selection& selection)
void select_whole_buffer(const Buffer& buffer, SelectionList& selections)
{
- selections = SelectionList{ Selection({0,0}, buffer.back_coord()) };
+ selections = SelectionList{ buffer, Selection({0,0}, buffer.back_coord()) };
}
void select_all_matches(const Buffer& buffer, SelectionList& selections,
const Regex& regex)
{
- SelectionList result;
+ SelectionList result(buffer);
for (auto& sel : selections)
{
auto sel_end = utf8::next(buffer.iterator_at(sel.max()));
@@ -470,7 +470,7 @@ void select_all_matches(const Buffer& buffer, SelectionList& selections,
void split_selections(const Buffer& buffer, SelectionList& selections,
const Regex& regex)
{
- SelectionList result;
+ SelectionList result(buffer);
for (auto& sel : selections)
{
auto begin = buffer.iterator_at(sel.min());