aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldEditorController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r--Source/SPFieldEditorController.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 05266381..a5ec347d 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -29,6 +29,7 @@
#import "SPDataCellFormatter.h"
#import "SPTooltip.h"
#import "SPGeometryDataView.h"
+#import "SPCopyTable.h"
#include <objc/objc-runtime.h>
@implementation SPFieldEditorController
@@ -403,8 +404,11 @@
}
// Locate the caret in editTextView
- // (to select all takes a bit time for large data)
- [editTextView setSelectedRange:NSMakeRange(0,0)];
+ // (restore a given selection coming from the in-cell editing mode)
+ NSRange selRange = [callerInstance fieldEditorSelectedRange];
+ [editTextView setSelectedRange:selRange];
+ [callerInstance setFieldEditorSelectedRange:NSMakeRange(0,0)];
+
// If the string content is NULL select NULL for convenience
if([stringValue isEqualToString:[prefs objectForKey:SPNullValue]])