We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pattern(_:)
0
1 parent d608748 commit f914a74Copy full SHA for f914a74
Sources/DiffableTextKitXPattern/Style.swift
@@ -117,7 +117,12 @@ extension PatternTextStyle {
117
} none: {
118
commit, virtuals in
119
commit.snapshot.append(contentsOf: virtuals, as: .phantom)
120
- commit.snapshot.select(commit.snapshot.endIndex)
+ //=----------------------------------=
121
+ // Selection
122
123
+ switch virtuals.endIndex != pattern.endIndex { // real vs fake
124
+ case true: commit.snapshot.select(commit.snapshot .endIndex)
125
+ case false: commit.snapshot.select(commit.snapshot.startIndex) }
126
} done: {
127
commit, virtuals, mismatches in
128
//=----------------------------------=
0 commit comments