aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPHistoryController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPHistoryController.m')
-rw-r--r--Source/SPHistoryController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m
index dcef796c..567ebd7a 100644
--- a/Source/SPHistoryController.m
+++ b/Source/SPHistoryController.m
@@ -145,6 +145,9 @@
- (IBAction) historyControlClicked:(NSSegmentedControl *)theControl
{
+ // Ensure history navigation is permitted - trigger end editing and any required saves
+ if (![theDocument couldCommitCurrentViewActions]) return;
+
switch ([theControl selectedSegment])
{
// Back button clicked: