Commit 0a1f223b79

0a1f223b7985869766ef08a3cbc7061d29edbb06

parent: 9cb5e048a0

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-09 02:34 UTC

Clear shrunk table columns when the text is reloaded

A merge or revert replaced the text but kept column ranges measured on the old text.

Layout: unified · split

Sources/OrgEditorAppKit/OrgEditor.swift +2 · view
@@ -1296,6 +1296,8 @@ extension OrgEditor: DocumentBuffer {
1296 var state = view 1296 var state = view
1297 state.selection = [selected.location..<NSMaxRange(selected)] 1297 state.selection = [selected.location..<NSMaxRange(selected)]
1298 let mapped = state.mapped(through: edits) 1298 let mapped = state.mapped(through: edits)
1299 // Shrunk columns were measured on the old text.
1300 shrunk = ShrunkColumns()
1299 load(document.text) 1301 load(document.text)
1300 setFolds(FoldState(folds: mapped.folds, bodyFolds: mapped.bodyFolds, wrapperFolds: mapped.wrapperFolds)) 1302 setFolds(FoldState(folds: mapped.folds, bodyFolds: mapped.bodyFolds, wrapperFolds: mapped.wrapperFolds))
1301 let selection = mapped.selection[0] 1303 let selection = mapped.selection[0]
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form