A table widens its columns to its text the first time rows arrive, as a pivot table's results do. The widening comes with the rows, which arrive outside the undo history, not with the edit that made the region, so undoing the region leaves the columns wide. Following files said nothing of it; it now says so where it says rows arrive outside undo, and the random edits' workaround points there.
- commit
- 2598df01b979a27ae6e2000b322cb8704b875e95
- parent
- 60442de7cf9ca95a56eee8935e2ebe0a9acedbed
- author
- Dami <dami.etoile@gmail.com>
- kind
- docs risk score 0.0 of 3, Jev's estimate
| M | docs/ | 6 | +++++- |
| M | internal/ | 5 | +++-- |
@@ -91,7 +91,11 @@ a file that doesn't change costs one check.
9191 9292 Rows arrive outside the undo history, as an array's spilled values do:9393 undo takes back edits, not the file's rows, and rows arriving don't mark94-the spreadsheet modified.94+the spreadsheet modified. The first rows a region shows widen its95+columns to their text, up to 30 characters, where no width was set, as96+a [pivot table](../sheets/pivots.md)'s results do. The widening comes97+with the rows rather than an edit, so it stays when undo takes the98+region back; set the width to change it.9599 96100 ## Pause, read again, unlink97101 @@ -247,8 +247,9 @@ func feedAll(wb *Workbook, feeds map[string]LiveOp) {
247247 248248 // sendRows sends a region its rows. A table widens its columns to its249249 // text the first time it shows, outside the undo history as its rows250-// are, so undoing the region leaves them wide; the edits change widths251-// themselves instead.250+// are, so undoing the region leaves them wide, as intended251+// (docs/files/following.md); the edits change widths themselves252+// instead.252253 func sendRows(wb *Workbook, op LiveOp) {253254 if s, r, ok := wb.Region(op.Region); ok {254255 s.meta(nameKey(r.Name)).fitted = true