Commit 227cd4e
authored
Fix CEUndoManager grouping (#69)
### Description
Fixes #68
`DelegatedUndoManager` does not override
```swift
func beginUndoGrouping()
func endUndoGrouping()
```
so calling
```swift
textView.undoManager?.beginUndoGrouping()
```
[here](https://github.com/CodeEditApp/CodeEditSourceEditor/blob/6b2c945501f0a5c15d8aa6d159fb2550c391bdd0/Sources/CodeEditSourceEditor/Controller/TextViewController%2BToggleComment.swift#L23) and [here](https://github.com/CodeEditApp/CodeEditSourceEditor/blob/6b2c945501f0a5c15d8aa6d159fb2550c391bdd0/Sources/CodeEditSourceEditor/Controller/TextViewController%2BIndentLines.swift#L25) does not undo as group as expected.
I also updated the names to match between the `CEUndoManager` and `UndoManager`.
### Related Issues
* #68
### Checklist
- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code
### Screenshots
#### Before:
https://github.com/user-attachments/assets/f3d0de26-f359-464f-8fe1-15a7032fb3d7
#### After:
https://github.com/user-attachments/assets/5716a972-cb2b-41ee-bee9-218967909eed1 parent 1792167 commit 227cd4e
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
167 | | - | |
| 175 | + | |
168 | 176 | | |
169 | | - | |
| 177 | + | |
170 | 178 | | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
176 | | - | |
| 184 | + | |
177 | 185 | | |
178 | | - | |
| 186 | + | |
179 | 187 | | |
180 | 188 | | |
181 | 189 | | |
| |||
0 commit comments