Revision: 29285
          http://sourceforge.net/p/bibdesk/svn/29285
Author:   hofman
Date:     2025-07-17 18:04:48 +0000 (Thu, 17 Jul 2025)
Log Message:
-----------
save selection only when actually committing

Modified Paths:
--------------
    trunk/bibdesk/BDSKEditor.m

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2025-07-17 17:47:26 UTC (rev 29284)
+++ trunk/bibdesk/BDSKEditor.m  2025-07-17 18:04:48 UTC (rev 29285)
@@ -504,7 +504,6 @@
         NSTextView *textView = (NSTextView *)firstResponder;
         NSTextField *textField = nil;
                NSInteger editedRow = -1;
-               NSArray *selection = [textView selectedRanges];
         if ([textView isFieldEditor]) {
             firstResponder = (NSResponder *)[textView delegate];
             if ([firstResponder isKindOfClass:[NSTextField class]])
@@ -560,6 +559,8 @@
         
         // commit should now succeed without errors
         
+        NSArray *selection = [textView selectedRanges];
+        
                editorFlags.didSetupFields = NO; // if we we rebuild the 
fields, the selection will become meaningless
         
         // commit edits (formatters may refuse to allow this)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to