Apply multiple edits to the buffer efficiently using in-memory lines array.
Applies edits in reverse order (from end to start) to preserve line numbers. Works with in-memory lines array for efficient manipulation.
2. Apply changes in reverse order (from end to start) to preserve line numbers
3. For each change: calls apply_edit()
4. Join lines back into content string
5. Write to file (backup, write, updates metadata)
Changes must be sorted descending by start line before calling.
| changes |
List of FileChange objects to apply (must be sorted descending by start) |
| Error |
if edits cannot be applied |