mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Disable undo/redo menu items when appropriate
This commit is contained in:
@@ -1651,6 +1651,10 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
[aMenuItem setState:custom ? NSOnState : NSOffState];
|
||||
}
|
||||
}
|
||||
else if([aMenuItem action] == @selector(undo:))
|
||||
return document->undo_manager().can_undo();
|
||||
else if([aMenuItem action] == @selector(redo:))
|
||||
return document->undo_manager().can_redo();
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user