mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-26 03:36:54 -06:00
AutoSum over any selection of more than one cell wrote a total under each column, so a row selected (B2:E2) got four one-cell totals in row 3 instead of =SUM(B2:E2) in F2. As Excel does, totals now go in the selection's empty last row or column, and otherwise past it: - a single row: its total in its last cell when that is empty, else just to its right; - a block whose last column is empty: each row's total there; whose last row is empty: each column's; both: both, and the block's total in the corner; - otherwise totals under each column, as before. A whole-row selection still stops at the data's last column, and all totals are one undo step. Tests: autosum_over_a_row_totals_it_to_the_right, autosum_over_a_whole_row_totals_it_after_the_data and autosum_fills_a_selections_empty_last_column_and_row; each fails without the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>