aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2017-02-12 19:06:31 +0100
committerMax <post@wickenrode.com>2017-02-12 19:06:31 +0100
commitaee6a009a5355aa3c7c91f885685868e5294e71c (patch)
tree573f4378bf12b0d5aefef3fdc2a7b087e74cc909
parent3ea2609a524c1b6dfd0dbfb5d50b4126a366713a (diff)
downloadsequelpro-aee6a009a5355aa3c7c91f885685868e5294e71c.tar.gz
sequelpro-aee6a009a5355aa3c7c91f885685868e5294e71c.tar.bz2
sequelpro-aee6a009a5355aa3c7c91f885685868e5294e71c.zip
Fix an erroneous if condition (#2688)
In some rare cases this could have resulted in an unexpected „No data was updated“ error message
-rw-r--r--Source/SPFieldEditorController.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 21a220c7..0298973d 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -1380,7 +1380,7 @@ typedef enum {
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;