summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-05-11 19:44:19 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-05-12 18:59:00 +0100
commitdb8a4ca318e894713a396c36f13e8c614b166647 (patch)
tree91a26347b2e5748f5f15fe49b72c2ae1a9457a5d /src/normal.cc
parent5e47c503d927442f7c6faff2e1f891f8efe8a26f (diff)
SelectionList no longer inherit from std::vector
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 1b1f9152..062f512c 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -845,7 +845,7 @@ void indent(Context& context, int)
for (auto line = sel.min().line; line < sel.max().line+1; ++line)
{
if (indent_empty or buffer[line].length() > 1)
- sels.emplace_back(line, line);
+ sels.push_back({line, line});
}
}
if (not sels.empty())
@@ -881,12 +881,12 @@ void deindent(Context& context, int)
else
{
if (deindent_incomplete and width != 0)
- sels.emplace_back(line, ByteCoord{line, column-1});
+ sels.push_back({ line, ByteCoord{line, column-1} });
break;
}
if (width == indent_width)
{
- sels.emplace_back(line, ByteCoord{line, column});
+ sels.push_back({ line, ByteCoord{line, column} });
break;
}
}
@@ -1245,7 +1245,7 @@ public:
auto it = std::upper_bound(m_ranges.begin(), m_ranges.end(), begin,
[](ByteCoord c, const Selection& sel)
{ return c < sel.min(); });
- m_ranges.emplace(it, begin, buffer.char_prev(end));
+ m_ranges.insert(it, Selection{ begin, buffer.char_prev(end) });
}
void on_erase(const Buffer& buffer, ByteCoord begin, ByteCoord end)
@@ -1255,7 +1255,7 @@ public:
auto it = std::upper_bound(m_ranges.begin(), m_ranges.end(), pos,
[](ByteCoord c, const Selection& sel)
{ return c < sel.min(); });
- m_ranges.emplace(it, pos, pos);
+ m_ranges.insert(it, Selection{ pos, pos });
}
SelectionList& ranges() { return m_ranges; }