Permalink
Browse files

Fix an erroneous if condition (#2688)

In some rare cases this could have resulted in an unexpected „No data was updated“ error message
  • Loading branch information...
dmoagx committed Feb 12, 2017
1 parent 3ea2609 commit aee6a009a5355aa3c7c91f885685868e5294e71c
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/SPFieldEditorController.m
@@ -1380,7 +1380,7 @@ - (void)textViewDidChangeSelection:(NSNotification *)notification
if([notification object] == editTextView) {
// Do nothing if user really didn't changed text (e.g. for font size changing return)
if(!editTextViewWasChanged && (editSheetWillBeInitialized
- || (([[[notification object] textStorage] editedRange].length == 0)
+ || (([[[notification object] textStorage] editedRange].location == NSNotFound)
&& ([[[notification object] textStorage] changeInLength] == 0)))) {
// Inform the undo-grouping about the caret movement
selectionChanged = YES;

0 comments on commit aee6a00

Please sign in to comment.