mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Record current replace string as part of macro find action
Previously we would only record it if the user invoked a replace action from the find dialog, but the user may invoke “find” from the dialog and then subsequently “replace” via keyboard/menu (where we would not record the string).
This commit is contained in:
@@ -2210,11 +2210,9 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
{
|
||||
NSMutableDictionary* dict = [NSMutableDictionary dictionary];
|
||||
|
||||
dict[@"findString"] = aFindServer.findString;
|
||||
dict[@"findString"] = aFindServer.findString;
|
||||
dict[@"replaceString"] = aFindServer.replaceString;
|
||||
|
||||
static find_operation_t const replaceActions[] = { kFindOperationReplaceAll, kFindOperationReplaceAllInSelection, kFindOperationReplace, kFindOperationReplaceAndFind };
|
||||
if(oak::contains(std::begin(replaceActions), std::end(replaceActions), aFindServer.findOperation))
|
||||
dict[@"replaceString"] = aFindServer.replaceString;
|
||||
static find_operation_t const inSelectionActions[] = { kFindOperationFindInSelection, kFindOperationReplaceAllInSelection };
|
||||
if(oak::contains(std::begin(inSelectionActions), std::end(inSelectionActions), aFindServer.findOperation))
|
||||
dict[@"replaceAllScope"] = @"selection";
|
||||
|
||||
Reference in New Issue
Block a user