From ee7d89331b3531b0a092ef0d77792a2d99504892 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 26 Dec 2016 12:50:16 +0100 Subject: [PATCH] fixed: selection dragging was broken by changes to insertText --- AppKit/CPTextView/CPTextView.j | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index ea9a7ba78..3ff43f3e2 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -989,7 +989,8 @@ var kDelegateRespondsTo_textShouldBeginEditing _movingSelection = CPMakeRange(_startTrackingLocation, 0); dragPlaceholder = [[CPTextView alloc] initWithFrame:placeholderFrame]; - [dragPlaceholder insertText:placeholderString]; + [dragPlaceholder._textStorage replaceCharactersInRange:CPMakeRange(0, 0) withAttributedString:placeholderString]; + [dragPlaceholder setBackgroundColor:[CPColor colorWithRed:1 green:1 blue:1 alpha:0]]; [dragPlaceholder setAlphaValue:0.5];