summaryrefslogtreecommitdiff
path: root/src/context.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/context.cc
parent7bc73b7ef9402f81a6bb496b03ba84197f76e642 (diff)
SelectionList know its buffer and timestamp
Diffstat (limited to 'src/context.cc')
-rw-r--r--src/context.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/context.cc b/src/context.cc
index 00e3ff50..dac65284 100644
--- a/src/context.cc
+++ b/src/context.cc
@@ -10,10 +10,10 @@ namespace Kakoune
Context::Context() = default;
Context::~Context() = default;
-Context::Context(InputHandler& input_handler, Buffer& buffer,
- SelectionList selections, String name)
+Context::Context(InputHandler& input_handler, SelectionList selections,
+ String name)
: m_input_handler{&input_handler},
- m_selections{{buffer, std::move(selections)}},
+ m_selections{std::move(selections)},
m_name(std::move(name))
{}
@@ -110,7 +110,7 @@ void Context::push_jump()
}
m_jump_list.erase(std::remove(begin(m_jump_list), end(m_jump_list), jump),
end(m_jump_list));
- m_jump_list.push_back({buffer(), jump});
+ m_jump_list.push_back(jump);
m_current_jump = m_jump_list.end();
}
@@ -168,7 +168,7 @@ void Context::change_buffer(Buffer& buffer)
if (has_client())
client().change_buffer(buffer);
else
- m_selections = DynamicSelectionList{ buffer };
+ m_selections = DynamicSelectionList{ { buffer, Selection{} } };
if (has_input_handler())
input_handler().reset_normal_mode();
}