From ef7f92ed151c7bc623539d55166076f61c54cddd Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 11 Jan 2020 15:09:41 +0100 Subject: [PATCH 1/4] fixed: documentation for attributedStringWithAttachment: was missing --- AppKit/CPTextView/CPTextStorage.j | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AppKit/CPTextView/CPTextStorage.j b/AppKit/CPTextView/CPTextStorage.j index c59e5744e..13b22ae25 100644 --- a/AppKit/CPTextView/CPTextStorage.j +++ b/AppKit/CPTextView/CPTextStorage.j @@ -262,6 +262,12 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1, return [super attributedSubstringFromRange:aRange]; } +/*! + Returns an instance of CPTextStorage that contains the provided instance of CPView. + This can be used to insert arbitrary views into the text. These views are treated as individual characters during editing. + This works only with views that implement to the CPCoding protocol +*/ + + (id)attributedStringWithAttachment:(CPView)someView { var result = [[self alloc] initWithString:_CPAttachmentCharacterAsString]; From 055d63eeb5d3a788d0b11b45d0a2eb961fcc8a66 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 11 Jan 2020 15:13:04 +0100 Subject: [PATCH 2/4] formatting --- AppKit/CPTextView/CPTextStorage.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextStorage.j b/AppKit/CPTextView/CPTextStorage.j index 13b22ae25..ebaaf6976 100644 --- a/AppKit/CPTextView/CPTextStorage.j +++ b/AppKit/CPTextView/CPTextStorage.j @@ -265,7 +265,7 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1, /*! Returns an instance of CPTextStorage that contains the provided instance of CPView. This can be used to insert arbitrary views into the text. These views are treated as individual characters during editing. - This works only with views that implement to the CPCoding protocol + This works only with views that conform to the CPCoding protocol */ + (id)attributedStringWithAttachment:(CPView)someView From f7c8f24bff4204f26852b650008e7b6425faa6d6 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 11 Jan 2020 15:13:30 +0100 Subject: [PATCH 3/4] removed dead code --- AppKit/CPTextView/CPTextStorage.j | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/AppKit/CPTextView/CPTextStorage.j b/AppKit/CPTextView/CPTextStorage.j index ebaaf6976..074510e9a 100644 --- a/AppKit/CPTextView/CPTextStorage.j +++ b/AppKit/CPTextView/CPTextStorage.j @@ -299,25 +299,3 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1, } @end - - -@implementation CPTextStorage (CPCoding) - -- (id)initWithCoder:(CPCoder)aCoder -{ - self = [super initWithCoder:aCoder]; - - if (self) - { - - } - - return self; -} - -- (void)encodeWithCoder:(CPCoder)aCoder -{ - [super encodeWithCoder:aCoder]; -} - -@end From d1bfe62a65dfcf264317fde90afbe47f909e8256 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 12 Jan 2020 17:08:23 +0100 Subject: [PATCH 4/4] removed: obsolete fixme comment --- AppKit/CPTextView/CPLayoutManager.j | 3 --- 1 file changed, 3 deletions(-) diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index 4f5be53df..5ae1c525e 100644 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -2,9 +2,6 @@ * CPLayoutManager.j * AppKit * - * FIXME remove from DOM when scrolled out of visible area? (as done in CPTableView) - * - * * Created by Daniel Boehringer on 27/12/2013. * All modifications copyright Daniel Boehringer 2013. * Extensive code formatting and review by Andrew Hankinson