summaryrefslogtreecommitdiff
path: root/src/selection.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-02-09 23:47:55 +0000
committerMaxime Coste <frrrwww@gmail.com>2012-02-09 23:47:55 +0000
commitd84d085cc268c4127a624d05063f64df5ffa361d (patch)
tree990e7a453ba60c6153e7877ecd6649942d09fdb6 /src/selection.cc
parent04a37d8895a5e2e1a59e71d447c07e9aefcee64d (diff)
Merge captures into registers, implements register insertion
Diffstat (limited to 'src/selection.cc')
-rw-r--r--src/selection.cc30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/selection.cc b/src/selection.cc
index e772179c..24793b2c 100644
--- a/src/selection.cc
+++ b/src/selection.cc
@@ -3,30 +3,14 @@
namespace Kakoune
{
-Selection::Selection(const BufferIterator& first, const BufferIterator& last,
- const CaptureList& captures)
- : m_first(first), m_last(last), m_captures(captures)
-{
- register_with_buffer();
-}
-
-Selection::Selection(const BufferIterator& first, const BufferIterator& last,
- CaptureList&& captures)
- : m_first(first), m_last(last), m_captures(captures)
+Selection::Selection(const BufferIterator& first, const BufferIterator& last)
+ : m_first(first), m_last(last)
{
register_with_buffer();
}
Selection::Selection(const Selection& other)
- : m_first(other.m_first), m_last(other.m_last),
- m_captures(other.m_captures)
-{
- register_with_buffer();
-}
-
-Selection::Selection(Selection&& other)
- : m_first(other.m_first), m_last(other.m_last),
- m_captures(other.m_captures)
+ : m_first(other.m_first), m_last(other.m_last)
{
register_with_buffer();
}
@@ -44,7 +28,6 @@ Selection& Selection::operator=(const Selection& other)
m_first = other.m_first;
m_last = other.m_last;
- m_captures = other.m_captures;
if (new_buffer)
register_with_buffer();
@@ -71,13 +54,6 @@ void Selection::merge_with(const Selection& selection)
m_last = selection.m_last;
}
-BufferString Selection::capture(size_t index) const
-{
- if (index < m_captures.size())
- return m_captures[index];
- return "";
-}
-
static void update_iterator(const Modification& modification,
BufferIterator& iterator)
{