Forbid context copy

This commit is contained in:
Maxime Coste 2012-09-26 14:27:23 +02:00
parent efc069b531
commit 77eb86bcdb
3 changed files with 2 additions and 2 deletions

View File

@ -504,7 +504,7 @@ void add_hook(const CommandParameters& params, Context& context)
auto hook_func = [=](const String& param, const Context& context) {
if (boost::regex_match(param.begin(), param.end(), regex))
{
Context new_context(context);
Context new_context(context.editor());
CommandManager::instance().execute(command, new_context);
}
};

View File

@ -23,6 +23,7 @@ struct Context
Context(Editor&& editor)
: m_editor(&editor) {}
Context(const Context&) = delete;
Context& operator=(const Context&) = delete;
Buffer& buffer() const

View File

@ -27,7 +27,6 @@
using namespace Kakoune;
using namespace std::placeholders;
namespace Kakoune
{