File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Sources/DiffableTextViewsXiOS/Views Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,17 @@ public extension ProxyTextField.Selection {
2020 //=------------------------------------------------------------------------=
2121 // MARK: Accessors
2222 //=------------------------------------------------------------------------=
23-
23+
2424 @inlinable var value : String {
25+ // UITextField.selectedTextRange is never nil
2526 wrapped. text ( in: wrapped. selectedTextRange!) !
2627 }
2728
29+ @inlinable var marked : String {
30+ // UITextField.markedTextRange is sometimes nil
31+ wrapped. markedTextRange. map ( wrapped. text ( in: ) ) ! ?? String ( )
32+ }
33+
2834 //=------------------------------------------------------------------------=
2935 // MARK: Transformations
3036 //=------------------------------------------------------------------------=
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public extension ProxyTextField.Text {
2222 //=------------------------------------------------------------------------=
2323
2424 @inlinable var value : String {
25- wrapped. text!
25+ wrapped. text! // UITextField.text is never nil
2626 }
2727
2828 //=------------------------------------------------------------------------=
You can’t perform that action at this time.
0 commit comments