summaryrefslogtreecommitdiff
path: root/src/unit_tests.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-12-14 18:38:14 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-12-14 18:38:14 +0000
commitce0e71aacb77e40fd2312f04482263ef00f21df9 (patch)
treeede7dbe64fe35fb998845e17331771a5d16a5998 /src/unit_tests.cc
parent0c4d523b224439c3619603c914c016029c73c885 (diff)
Remove Editor::select methods, add a non-const selections getter
Diffstat (limited to 'src/unit_tests.cc')
-rw-r--r--src/unit_tests.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unit_tests.cc b/src/unit_tests.cc
index 278e0501..d3cda91d 100644
--- a/src/unit_tests.cc
+++ b/src/unit_tests.cc
@@ -76,8 +76,8 @@ void test_editor()
{
scoped_edition edition{editor};
- editor.select(select_whole_buffer);
- editor.select(std::bind(select_all_matches, _1, _2, Regex{"\\n\\h*"}));
+ select_whole_buffer(buffer, editor.selections());
+ select_all_matches(buffer, editor.selections(), Regex{"\\n\\h*"});
for (auto& sel : editor.selections())
{
kak_assert(buffer.byte_at(sel.min()) == '\n');
@@ -87,7 +87,7 @@ void test_editor()
editor.undo();
Selection sel{ 2_line, buffer.back_coord() };
- editor.select(sel, SelectMode::Replace);
+ editor.selections() = SelectionList{sel};
editor.insert("",InsertMode::Replace);
kak_assert(not buffer.is_end(editor.selections().main().first()));
}