summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-10-10 20:11:26 +1100
committerMaxime Coste <mawww@kakoune.org>2019-10-10 20:11:26 +1100
commitf2fa260929df58cb4f156f89bdefa5f82c92b9e0 (patch)
tree20a41ffef6cfea1136fc5976be715efb63d70333 /src
parente4f815e350c1079301449e5d0900fd6f06acc303 (diff)
parent2148b842749d52311d9018ffedfdc66205c640ff (diff)
Merge remote-tracking branch 'Delapouite/combine-selections'
Diffstat (limited to 'src')
-rw-r--r--src/normal.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 5661d6cc..b4bb0334 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -1849,7 +1849,7 @@ void combine_selection(const Buffer& buffer, Selection& sel, const Selection& ot
}
template<typename Func>
-void combine_selections(Context& context, SelectionList list, Func func)
+void combine_selections(Context& context, SelectionList list, Func func, StringView title)
{
if (&context.buffer() != &list.buffer())
throw runtime_error{"cannot combine selections from different buffers"};
@@ -1880,7 +1880,7 @@ void combine_selections(Context& context, SelectionList list, Func func)
list.set_main_index(sels.main_index());
}
func(context, std::move(list));
- }, "enter combining operator",
+ }, title,
"'a': append lists\n"
"'u': union\n"
"'i': intersection\n"
@@ -1912,7 +1912,7 @@ void save_selections(Context& context, NormalParams params)
};
if (combine and not empty)
- combine_selections(context, read_selections_from_register(reg, context), save_to_reg);
+ combine_selections(context, read_selections_from_register(reg, context), save_to_reg, "combine selections to register");
else
save_to_reg(context, context.selections());
}
@@ -1938,7 +1938,7 @@ void restore_selections(Context& context, NormalParams params)
set_selections(context, std::move(selections));
}
else
- combine_selections(context, std::move(selections), set_selections);
+ combine_selections(context, std::move(selections), set_selections, "combine selections from register");
}
void undo(Context& context, NormalParams params)