diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 20:37:07 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 20:37:07 +0000 |
| commit | ea95632709a6ae3df76772e83e1497a9fcfee52d (patch) | |
| tree | aa258ec83e7ec6f765c9c055d5faf1748dbde91b /src/context.cc | |
| parent | ad0682ec75d072c648f044580d817bef4098abc0 (diff) | |
Move Editor::selections_content to Context
Diffstat (limited to 'src/context.cc')
| -rw-r--r-- | src/context.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/context.cc b/src/context.cc index 6e94b174..163beb16 100644 --- a/src/context.cc +++ b/src/context.cc @@ -187,6 +187,14 @@ const SelectionList& Context::selections() const return editor().selections(); } +std::vector<String> Context::selections_content() const +{ + std::vector<String> contents; + for (auto& sel : selections()) + contents.push_back(buffer().string(sel.min(), buffer().char_next(sel.max()))); + return contents; +} + void Context::begin_edition() { ++m_edition_level; |
