From 39983e54d0c7a760803b10276642dc2e15426476 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 4 Apr 2014 00:00:06 +0100 Subject: [PATCH] minor code style tweak --- src/context.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/context.cc b/src/context.cc index 887a9a37..00e3ff50 100644 --- a/src/context.cc +++ b/src/context.cc @@ -10,9 +10,12 @@ namespace Kakoune Context::Context() = default; Context::~Context() = default; -Context::Context(InputHandler& input_handler, Buffer& buffer, SelectionList selections, String name) - : m_input_handler{&input_handler}, m_selections{{buffer, std::move(selections)}}, - m_name(std::move(name)) {} +Context::Context(InputHandler& input_handler, Buffer& buffer, + SelectionList selections, String name) + : m_input_handler{&input_handler}, + m_selections{{buffer, std::move(selections)}}, + m_name(std::move(name)) +{} Buffer& Context::buffer() const { @@ -186,9 +189,10 @@ const SelectionList& Context::selections() const std::vector Context::selections_content() const { + auto& buf = buffer(); std::vector contents; for (auto& sel : selections()) - contents.push_back(buffer().string(sel.min(), buffer().char_next(sel.max()))); + contents.push_back(buf.string(sel.min(), buf.char_next(sel.max()))); return contents; }