From 1046b22e967b181c75d5a814f7844e35256e7672 Mon Sep 17 00:00:00 2001 From: Wild Karl-Heinz Date: Wed, 2 Sep 2026 15:49:35 +0200 Subject: [PATCH] Show the selected range, not just the active cell, in status/formula bar New store computed selectionRangeName: for a single cell it's identical to activeCellName ("Umsatz::B2"), for a multi-cell selection it shows the full primary rectangle ("Umsatz::B2:E6"), and a discontiguous multi-selection gets a "+N" suffix for the further rectangles. activeCellName itself is untouched (still anchor-only, since that's what a formula/edit actually targets) -- only the formula bar's name field and the status bar's range label switch to the new computed. Co-Authored-By: Claude Sonnet 5 --- README.md | 11 ++++++++--- src/components/FormulaBar.vue | 4 ++-- src/components/StatusBar.vue | 2 +- src/store/__tests__/document.spec.ts | 16 ++++++++++++++++ src/store/document.ts | 23 +++++++++++++++++++++++ 5 files changed, 50 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b6111e9..fba370c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Vorbild von **Apple Numbers**. Zwei Dinge stehen im Mittelpunkt: ```bash npm install npm run dev # Vite-Devserver -npm run test # Vitest-Suite (Engine + Store + IO), 178 Tests +npm run test # Vitest-Suite (Engine + Store + IO), 179 Tests npm run build # Typecheck + Produktionsbuild npm run lint # ESLint (flat config) ``` @@ -134,7 +134,12 @@ Zeilenhöhe der Tabelle geklemmt. — dadurch **umbricht** eine lange Formel statt seitwärts wegzuscrollen, und an der unteren Kante lässt sie sich per **Maus** (natives `resize: vertical`) auf beliebig viele Zeilen aufziehen, um mehr auf einmal zu sehen. `Alt`+`Enter` -bzw. `Cmd`+`Enter`, `F4` und `Esc` verhalten sich wie im In-Zellen-Editor. +bzw. `Cmd`+`Enter`, `F4` und `Esc` verhalten sich wie im In-Zellen-Editor. Das +Namensfeld links davon (ebenso das Pendant links in der **Statuszeile**, die +mit den Blatt-Reitern eine gemeinsame Zeile am unteren Rand teilt) zeigt bei +einer Mehrfachauswahl nicht nur die aktive Zelle, sondern den ganzen markierten +**Bereich** (`Umsatz::B2:E6`), bei einer diskontinuierlichen Auswahl zusätzlich +`+N` für die weiteren Rechtecke. **Bezüge per Maus einfügen ("Point-Mode")**: sobald der Editor (Zelle oder Formelleiste) eine Formel (`=…`) enthält, fügt ein **Klick** auf eine Zelle — @@ -401,7 +406,7 @@ Grundrechenarten: `Übersicht!B2 = =SUM(Umsatz!B2:E2)`, `D2 = =B2-C2`, ## Tests -`npm run test` — Vitest, 178 Tests: +`npm run test` — Vitest, 179 Tests: - **lexer / parser** — Präzedenz & Assoziativität (`^` vor `*/` vor `+-`, `^` rechts, `-2^2 = -(2^2)`), lokale/qualifizierte/quoted Bezüge, `!` **und** `::`, diff --git a/src/components/FormulaBar.vue b/src/components/FormulaBar.vue index 83ef19b..eead335 100644 --- a/src/components/FormulaBar.vue +++ b/src/components/FormulaBar.vue @@ -108,8 +108,8 @@ function onKeydown(e: KeyboardEvent) {