File tree 1 file changed +12
-4
lines changed
Sources/CodeEditTextView/Utils
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ public class CEUndoManager {
40
40
parent? . redo ( )
41
41
}
42
42
43
+ public override func beginUndoGrouping( ) {
44
+ parent? . beginUndoGrouping ( )
45
+ }
46
+
47
+ public override func endUndoGrouping( ) {
48
+ parent? . endUndoGrouping ( )
49
+ }
50
+
43
51
public override func registerUndo( withTarget target: Any , selector: Selector , object anObject: Any ? ) {
44
52
// no-op, but just in case to save resources:
45
53
removeAllActions ( )
@@ -164,18 +172,18 @@ public class CEUndoManager {
164
172
// MARK: - Grouping
165
173
166
174
/// Groups all incoming mutations.
167
- public func beginGrouping ( ) {
175
+ public func beginUndoGrouping ( ) {
168
176
guard !isGrouping else {
169
- assertionFailure ( " UndoManager already in a group. Call `endGrouping ` before this can be called. " )
177
+ assertionFailure ( " UndoManager already in a group. Call `beginUndoGrouping ` before this can be called. " )
170
178
return
171
179
}
172
180
isGrouping = true
173
181
}
174
182
175
183
/// Stops grouping all incoming mutations.
176
- public func endGrouping ( ) {
184
+ public func endUndoGrouping ( ) {
177
185
guard isGrouping else {
178
- assertionFailure ( " UndoManager not in a group. Call `beginGrouping ` before this can be called. " )
186
+ assertionFailure ( " UndoManager not in a group. Call `endUndoGrouping ` before this can be called. " )
179
187
return
180
188
}
181
189
isGrouping = false
You can’t perform that action at this time.
0 commit comments