mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
For unknown key binding actions we append this info to its name
This commit is contained in:
@@ -694,13 +694,16 @@ static std::vector<bundles::item_ptr> relevant_items_in_scope (scope::context_t
|
||||
std::string name, action;
|
||||
if(std::string const* sel = boost::get<std::string>(&pair.second))
|
||||
{
|
||||
if(*sel == "noop:" || !seen.emplace(key, *sel).second || ![NSApp targetForAction:NSSelectorFromString([NSString stringWithCxxString:*sel])])
|
||||
if(*sel == "noop:" || !seen.emplace(key, *sel).second)
|
||||
continue;
|
||||
|
||||
action = *sel;
|
||||
name = format_string::replace(*sel, "[a-z](?=[A-Z])", "$0 ");
|
||||
name = format_string::replace(name, "(.+):\\z", "${1:/capitalize}");
|
||||
name = format_string::replace(name, "\\bsub Word\\b", "Sub-word");
|
||||
|
||||
if(![NSApp targetForAction:NSSelectorFromString([NSString stringWithCxxString:*sel])])
|
||||
name += " (unknown action)";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user