Use more precise wording for object selection info box

This commit is contained in:
Maxime Coste 2017-05-27 09:08:36 +01:00
parent d8cc50ed79
commit e97f23f2be

View File

@ -1052,7 +1052,8 @@ void select_object(Context& context, NormalParams params)
auto get_title = [] { auto get_title = [] {
const auto whole_flags = (ObjectFlags::ToBegin | ObjectFlags::ToEnd); const auto whole_flags = (ObjectFlags::ToBegin | ObjectFlags::ToEnd);
const bool whole = (flags & whole_flags) == whole_flags; const bool whole = (flags & whole_flags) == whole_flags;
return format("select {}{}object{}", return format("{} {}{}surrounding object{}",
mode == SelectMode::Extend ? "extend" : "select",
whole ? "" : "to ", whole ? "" : "to ",
flags & ObjectFlags::Inner ? "inner " : "", flags & ObjectFlags::Inner ? "inner " : "",
whole ? "" : (flags & ObjectFlags::ToBegin ? " begin" : " end")); whole ? "" : (flags & ObjectFlags::ToBegin ? " begin" : " end"));