Merge branch 'main' into gc-table-resize-overlaps

This commit is contained in:
FredApps authored and GitHub committed 2026-11-26 17:49:50 +01:00
commit abda1fe767
22 files changed
+494 -29

No files matched your search

+2
View File
@@ -189,6 +189,7 @@ Ranked; estimates in Opus 5.5 agent-hours. Detail and the full beta-gate list in
| 2026-10-15 | File › Options › Formulas: Maximum Iterations and Maximum Change fields for iterative calculation, disabled while it is off, with Excel's limits (1 to 32767, 0 or more) |
| 2026-10-15 | Function help follows the interface language: argument hints, autocomplete, Insert Function (search and readable categories) and the Formulas-tab menus read per-language tables of descriptions and argument names; Spanish keeps its 10 functions in the new format |
| 2026-10-15 | Row auto-fit counts a cell's line breaks only when the cell wraps, as Excel does: a file whose unwrapped cells hold multi-line text no longer opens with tall rows (typing a break still turns wrap on and grows the row) |
| 2026-10-15 | Keyboard: F8 Extend Selection and Shift+F8 Add or Remove Selection: arrows and clicks extend from the anchor or build multi-area selections without holding Shift or Ctrl, the status bar names the mode, and Esc, the key again or editing a cell ends it |
| 2026-10-14 | SORT, SORTBY and Data > Sort order numbers exactly like Excel, so 0.3 sorts before `=0.1+0.2` whatever the input order; `=` and COUNTIF keep their 15-digit comparison |
| 2026-10-14 | Set precision as displayed is applied: with the option on, formula results, spills and numbers typed or reformatted are stored as their number format shows them and formulas calculate from those values; `formulas.calculationOptions` gains `precisionAsDisplayed` (turning it on rounds existing constants; locked constants on a protected sheet keep their value; numbers written to a new sheet are rounded too) (#1343) |
| 2026-10-14 | Lookups (MATCH, XMATCH, VLOOKUP, HLOOKUP, XLOOKUP, LOOKUP) compare numbers exactly like Excel, so a computed key such as `=0.1+0.2` no longer finds 0.3; `=` and COUNTIF/SUMIF keep their 15-digit comparison |
@@ -324,6 +325,7 @@ Ranked; estimates in Opus 5.5 agent-hours. Detail and the full beta-gate list in
| 2026-10-16 | minor | Progress log: floating pictures' textures bounded and kept per workbook |
| 2026-10-16 | trivial | Progress log: web preferences kept between visits (#1562) |
| 2026-10-16 | minor | Progress log: interface fonts held once instead of twice |
| 2026-10-15 | minor | Progress log: F8 and Shift+F8 selection modes |
| 2026-10-14 | minor | Progress log: sorts order numbers exactly |
| 2026-10-14 | minor | Progress log: Set precision as displayed applied in calculation (#1343) |
| 2026-10-14 | minor | Progress log: `.xls` import reads cell formatting |
+12
View File
@@ -327,6 +327,18 @@ impl SheetApp {
self.open_dialog(name, p.clone());
Ok(json!({"dialog": self.dialog.as_ref().map(|d| d.name())}))
}
"ui.selectionMode" => {
// `{"mode": "extend"}` (F8), `"add"` (Shift+F8) or `"off"`; `{}` reports the mode.
match p.get("mode").and_then(Json::as_str) {
Some(id) => match crate::grid::SelectionMode::parse(id) {
Some(mode) => self.grid.set_selection_mode(mode),
None => return Some(Err(format!("unknown selection mode {id:?} (use \"extend\", \"add\" or \"off\")"))),
},
None if p.get("mode").is_some_and(|v| !v.is_null()) => return Some(Err("`mode` must be \"extend\", \"add\" or \"off\"".into())),
None => {}
}
Ok(json!({"mode": self.grid.selection_mode.id()}))
}
"ui.pythonMode" => {
// `{"on": true}` starts Python mode on the active cell (or switches the edit in
// progress to it), `{"on": false}` leaves it; without `on` it switches. A start
+2
View File
@@ -18,6 +18,8 @@ impl SheetApp {
self.message = Some(("Text Box".into(), clean_error(&e)));
return;
}
// Editing a cell ends Extend and Add mode, as in Excel.
self.grid.set_selection_mode(crate::grid::SelectionMode::Off);
let Some(d) = self.session.active() else { return };
let Some(sh) = d.wb.active() else { return };
let at = sh.merge_at(d.selection.active).map(|m| m.start).unwrap_or(d.selection.active);
+5
View File
@@ -280,6 +280,11 @@ pub fn handle(app: &mut SheetApp, ctx: &egui::Context, method: &str, p: &Json) -
("ui.window.close", "Close Window", ""),
("ui.window.beginResize", "Resize Window", "{direction: north|south|east|west|northeast|northwest|southeast|southwest}"),
("ui.dialog", "Open Dialog", ""),
(
"ui.selectionMode",
"Extend or Add to Selection",
"{mode?: \"extend\" (F8) | \"add\" (Shift+F8) | \"off\"} → {mode}; {} reports the mode",
),
("ui.backstage", "File (Backstage view)", "{page?: home|new|open|info|saveAs|print|export|options|account|close}"),
(
"ui.printSettings",
+61
View File
@@ -401,10 +401,71 @@ pub struct GridState {
pub wheel_zoom: Option<WheelZoom>,
/// A one-finger touch drag in progress: it pans the sheet instead of selecting.
pub touch_pan: bool,
/// F8 Extend Selection or Shift+F8 Add or Remove Selection mode (see [`SelectionMode`]).
pub selection_mode: SelectionMode,
/// Add mode: the last area is the cell an arrow key moved to, not yet extended, so the next
/// arrow moves it again instead of keeping it.
pub add_pending: Option<RangeRef>,
/// Add mode header drag: the areas kept from before the drag, which the dragged range joins.
pub header_drag_base: Vec<String>,
/// What the macro step editor shows on the grid (Check, debugging).
pub macro_overlay: Option<crate::macro_editor::MacroOverlay>,
}
/// Excel's keyboard selection modes, shown in the status bar. In Extend mode (F8) arrow keys and
/// clicks extend from the anchor as if Shift were held. In Add mode (Shift+F8) arrow keys move the
/// active cell without dropping the selected areas, Shift+arrows grow a new area from there, and a
/// click adds an area (or removes one already selected) as Ctrl+click does. Esc, the same key
/// again, or editing a cell turns the mode off.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum SelectionMode {
#[default]
Off,
Extend,
Add,
}
impl SelectionMode {
/// The id the `ui.selectionMode` command takes and returns.
pub fn id(self) -> &'static str {
match self {
Self::Off => "off",
Self::Extend => "extend",
Self::Add => "add",
}
}
pub fn parse(id: &str) -> Option<Self> {
match id.trim().to_ascii_lowercase().as_str() {
"off" | "none" => Some(Self::Off),
"extend" => Some(Self::Extend),
"add" => Some(Self::Add),
_ => None,
}
}
/// The status bar text (an i18n catalog key), when the mode shows one.
pub fn status_text(self) -> Option<&'static str> {
match self {
Self::Off => None,
Self::Extend => Some("Extend Selection"),
Self::Add => Some("Add or Remove Selection"),
}
}
}
impl GridState {
/// Turns `mode` on, or off when it is already on (F8 / Shift+F8); the other mode ends.
pub fn toggle_selection_mode(&mut self, mode: SelectionMode) {
self.set_selection_mode(if self.selection_mode == mode { SelectionMode::Off } else { mode });
}
pub fn set_selection_mode(&mut self, mode: SelectionMode) {
self.selection_mode = mode;
self.add_pending = None;
}
}
/// Ctrl+wheel zoom for one (doc uid, sheet). egui eases a notch in over several frames and
/// fine-grained wheels send parts of one, so the turning is counted in notches, and each whole
/// notch steps [`WHEEL_ZOOM_LADDER`]. With animations on the zoom then glides to that step.
+38 -11
View File
@@ -4,11 +4,11 @@ use super::editor::validation_arrow;
use super::geo::Geo;
use super::keyboard::keyboard;
use super::menus::set_fill_tag;
use super::selection::select_ranges;
use super::selection::{add_mode_base, select_ranges};
use super::tables::{is_filter_button, table_headings};
use super::{
CellRef, Color32, CursorIcon, Drag, EditState, MAX_COLS, MAX_ROWS, Painter, Pos2, RangeRef, Rect, Sheet, SheetApp, Stroke, Tokens, Workbook,
json, pos2, vec2,
CellRef, Color32, CursorIcon, Drag, EditState, MAX_COLS, MAX_ROWS, Painter, Pos2, RangeRef, Rect, SelectionMode, Sheet, SheetApp, Stroke, Tokens,
Workbook, json, pos2, vec2,
};
// ------------------------------------------------------------------ interaction
@@ -23,6 +23,7 @@ struct InteractionInput<'a> {
press_origin: Option<Pos2>,
any_pointer_down: bool,
modifiers: egui::Modifiers,
selection_modifiers: egui::Modifiers,
position: Option<Pos2>,
primary_clicked: bool,
in_cells: bool,
@@ -58,6 +59,12 @@ pub(super) fn interact(app: &mut SheetApp, ui: &mut egui::Ui, resp: &egui::Respo
let primary_clicked = resp.clicked_by(egui::PointerButton::Primary);
let pointer = ctx.input(|i| i.pointer.clone());
let mods = ctx.input(|i| i.modifiers);
let mut selection_modifiers = mods;
match app.grid.selection_mode {
SelectionMode::Extend => selection_modifiers.shift = true,
SelectionMode::Add => selection_modifiers.command = true,
SelectionMode::Off => {}
}
// Hit-testing works in logical coordinates (see `Geo::rtl`).
let pos = pointer.interact_pos().or(pointer.hover_pos()).map(|p| geo.mirror_pos(p));
let in_cells = pos.is_some_and(|p| geo.in_cells(p));
@@ -91,6 +98,7 @@ pub(super) fn interact(app: &mut SheetApp, ui: &mut egui::Ui, resp: &egui::Respo
press_origin: pointer.press_origin(),
any_pointer_down: pointer.any_down(),
modifiers: mods,
selection_modifiers,
position: pos,
primary_clicked,
in_cells,
@@ -341,7 +349,7 @@ fn handle_header_autofit(app: &mut SheetApp, input: &InteractionInput<'_>) -> bo
fn handle_column_header_press(app: &mut SheetApp, input: &InteractionInput<'_>, p: Pos2) {
let (geo, sh, wb, sel) = (input.geo, input.sheet, input.workbook, &input.selection);
let mods = input.modifiers;
let mods = input.selection_modifiers;
let resp = input.response;
let in_col_header = input.in_column_header;
if in_col_header {
@@ -372,6 +380,7 @@ fn handle_column_header_press(app: &mut SheetApp, input: &InteractionInput<'_>,
return;
}
let range = if mods.shift { RangeRef::cols(sel.anchor.col.min(c), sel.anchor.col.max(c)) } else { RangeRef::cols(c, c) };
app.grid.header_drag_base = add_mode_base(app);
note_selecting_press(app);
select_ranges(app, range, mods.command, CellRef::new(geo.row_at(sh, geo.cells.top() + 1.0), c));
app.grid.drag = Drag::Cols(if mods.shift { sel.anchor.col } else { c });
@@ -380,7 +389,7 @@ fn handle_column_header_press(app: &mut SheetApp, input: &InteractionInput<'_>,
fn handle_row_header_press(app: &mut SheetApp, input: &InteractionInput<'_>, p: Pos2) {
let (geo, sh, wb, sel) = (input.geo, input.sheet, input.workbook, &input.selection);
let mods = input.modifiers;
let mods = input.selection_modifiers;
let in_row_header = input.in_row_header;
if in_row_header {
if let Some((r, y)) = row_edge(geo, sh, p.y) {
@@ -394,6 +403,7 @@ fn handle_row_header_press(app: &mut SheetApp, input: &InteractionInput<'_>, p:
return;
}
let range = if mods.shift { RangeRef::rows(sel.anchor.row.min(r), sel.anchor.row.max(r)) } else { RangeRef::rows(r, r) };
app.grid.header_drag_base = add_mode_base(app);
note_selecting_press(app);
select_ranges(app, range, mods.command, CellRef::new(r, geo.col_at(sh, geo.cells.left() + 1.0)));
app.grid.drag = Drag::Rows(if mods.shift { sel.anchor.row } else { r });
@@ -403,6 +413,7 @@ fn handle_row_header_press(app: &mut SheetApp, input: &InteractionInput<'_>, p:
fn handle_press(app: &mut SheetApp, input: &InteractionInput<'_>) {
let (geo, sh, wb, resp) = (input.geo, input.sheet, input.workbook, input.response);
let (pos, mods, sel) = (input.position, input.modifiers, &input.selection);
let sel_mods = input.selection_modifiers;
let (primary_clicked, in_cells, in_col_header, in_row_header, in_corner) =
(input.primary_clicked, input.in_cells, input.in_column_header, input.in_row_header, input.in_corner);
let (freeze_cols, freeze_rows) = (input.freeze_columns, input.freeze_rows);
@@ -520,13 +531,27 @@ fn handle_press(app: &mut SheetApp, input: &InteractionInput<'_>) {
return;
}
app.grid.last_click = Some((c, now));
if mods.shift {
if sel_mods.shift {
note_selecting_press(app);
app.grid.header_drag_base = add_mode_base(app);
let mut ranges = app.grid.header_drag_base.clone();
if let Some(pending) = app.grid.add_pending.take()
&& ranges.last().is_some_and(|r| r == &pending.a1())
{
ranges.pop();
}
ranges.push(RangeRef::new(sel.anchor, c).a1());
let _ = app.run("selection.set", json!({"range": ranges.join(","), "active": sel.active.a1()}));
if let Some(d) = app.session.active_mut() {
d.selection.anchor = sel.anchor;
}
} else if mods.shift {
note_selecting_press(app);
let _ = app.session.run("selection.set", json!({"range": RangeRef::new(sel.anchor, c).a1(), "active": sel.active.a1()}));
if let Some(d) = app.session.active_mut() {
d.selection.anchor = sel.anchor;
}
} else if mods.command {
} else if mods.command || sel_mods.command {
// Ctrl+click (without Alt) on a hyperlink's text follows it instead of adding the cell to the selection.
if let Some(h) = sh.hyperlinks.get(&c).cloned()
&& acts
@@ -719,14 +744,16 @@ fn handle_dragging(app: &mut SheetApp, input: &InteractionInput<'_>) {
}
Drag::Rows(anchor) => {
let r = geo.row_at(sh, p.y);
let _ =
app.session.run("selection.set", json!({"range": RangeRef::rows(anchor.min(r), anchor.max(r)).a1(), "active": sel.active.a1()}));
let range = RangeRef::rows(anchor.min(r), anchor.max(r)).a1();
let ranges = app.grid.header_drag_base.iter().map(String::as_str).chain([range.as_str()]).collect::<Vec<_>>().join(",");
let _ = app.run("selection.set", json!({"range": ranges, "active": sel.active.a1()}));
scroll_by(app, vec2(0.0, auto.y));
}
Drag::Cols(anchor) => {
let c = geo.col_at(sh, p.x);
let _ =
app.session.run("selection.set", json!({"range": RangeRef::cols(anchor.min(c), anchor.max(c)).a1(), "active": sel.active.a1()}));
let range = RangeRef::cols(anchor.min(c), anchor.max(c)).a1();
let ranges = app.grid.header_drag_base.iter().map(String::as_str).chain([range.as_str()]).collect::<Vec<_>>().join(",");
let _ = app.run("selection.set", json!({"range": ranges, "active": sel.active.a1()}));
scroll_by(app, vec2(auto.x, 0.0));
}
drag @ (Drag::PointRows(_) | Drag::PointCols(_)) => {
+78 -9
View File
@@ -1,7 +1,8 @@
use super::geo::Geo;
use super::interact::object_key;
use super::menus::is_checkbox;
use super::{CellRef, Drag, Sheet, SheetApp, json};
use super::selection::add_mode_move;
use super::{CellRef, Drag, SelectionMode, Sheet, SheetApp, json};
/// Whether something other than the grid owns the keyboard this frame: an editor, a dialog, a
/// message, a menu or another focused widget. Kept out of [`keyboard`] to hold its complexity
@@ -82,6 +83,7 @@ pub(super) fn keyboard(app: &mut SheetApp, ctx: &egui::Context, resp: &egui::Res
}
egui::Event::Key { key, physical_key, pressed: true, modifiers: m, .. } => {
use egui::Key;
let Some(m) = selection_mode_key(app, sh, key, m) else { continue };
let nudged = object_key(app, sh, key, m);
if nudged || crate::keymap::dispatch(app, ctx, key, physical_key, m, geo, sh) {
shortcut_ran |= !nudged;
@@ -89,13 +91,7 @@ pub(super) fn keyboard(app: &mut SheetApp, ctx: &egui::Context, resp: &egui::Res
}
let cmd = m.command;
let shift = m.shift;
let mv = |app: &mut SheetApp, dr: i64, dc: i64| {
let from = app.session.active().map(|d| if shift { d.selection.moving_end() } else { d.selection.active });
let _ = app.session.run("selection.move", json!({"dr": dr, "dc": dc, "extend": shift, "jump": cmd}));
app.grid.ensure_visible = true;
app.grid.reveal_moving_end = shift;
app.grid.reveal_from = from;
};
let mv = |app: &mut SheetApp, dr: i64, dc: i64| move_selection(app, dr, dc, shift, cmd);
match key {
Key::ArrowUp => mv(app, -1, 0),
Key::ArrowDown => mv(app, 1, 0),
@@ -106,6 +102,7 @@ pub(super) fn keyboard(app: &mut SheetApp, ctx: &egui::Context, resp: &egui::Res
Key::PageUp if !cmd => mv(app, -page, 0),
Key::PageDown => app.run_or_alert("sheet.next", json!({})),
Key::PageUp => app.run_or_alert("sheet.previous", json!({})),
// Add mode: Home and End move the active cell as arrows do, keeping the selected areas.
Key::Home if cmd => {
let r = sh.freeze.map(|f| f.0).unwrap_or(0);
let c = sh.freeze.map(|f| f.1).unwrap_or(0);
@@ -149,11 +146,13 @@ pub(super) fn keyboard(app: &mut SheetApp, ctx: &egui::Context, resp: &egui::Res
}
}
Key::Escape if app.selected_object.is_some() => app.selected_object = None,
Key::Escape => cancel_pending(app),
Key::Escape => cancel_pending_and_selection_mode(app),
Key::Space if !cmd && !shift && is_checkbox(sh, app) => app.run_or_alert("cell.toggleCheckbox", json!({})),
// F8 Extend Selection, Shift+F8 Add or Remove Selection: each toggles its mode.
Key::F8 if m.alt => {
app.open_dialog("macros", json!({}));
}
Key::F8 if !cmd => toggle_selection_mode(app, shift),
Key::F9 => app.run_or_alert("formulas.calculateNow", json!({})),
Key::F4 if !cmd => {}
// Ctrl+Shift+letter (⌘⇧letter) runs the macro with that shortcut, unless GridCraft uses it.
@@ -243,6 +242,76 @@ fn request_grid_ime(app: &SheetApp, ctx: &egui::Context, resp: &egui::Response,
});
}
/// The F8 selection modes' part of a key press. Extend mode makes the navigation keys extend from
/// the anchor as if Shift were held; Add mode moves Shift+Home and Ctrl+Shift+End within the area
/// being added, and Home, Ctrl+Home and Ctrl+End move the active cell keeping the areas. The modifiers to handle the key with, or `None` when the key was handled here.
/// Kept out of [`keyboard`] to hold its complexity within the workspace limit.
fn selection_mode_key(app: &mut SheetApp, sh: &Sheet, key: egui::Key, m: egui::Modifiers) -> Option<egui::Modifiers> {
use egui::Key;
let navigation =
matches!(key, Key::ArrowUp | Key::ArrowDown | Key::ArrowLeft | Key::ArrowRight | Key::PageUp | Key::PageDown | Key::Home | Key::End);
let m = if navigation && app.grid.selection_mode == SelectionMode::Extend { egui::Modifiers { shift: true, ..m } } else { m };
if app.grid.selection_mode == SelectionMode::Add && m.shift && (key == Key::Home || (m.command && key == Key::End)) {
let from = app.session.active().map(|d| d.selection.moving_end()).unwrap_or_default();
let to = match (key, m.command) {
(Key::Home, true) => CellRef::new(0, 0),
(Key::Home, false) => CellRef::new(from.row, 0),
(Key::End, true) => sh.used_range().map(|u| u.end).unwrap_or_default(),
_ => from,
};
add_mode_move(app, i64::from(to.row) - i64::from(from.row), i64::from(to.col) - i64::from(from.col), true, false);
return None;
}
if add_mode_home_end(app, sh, key, m.command) {
return None;
}
Some(m)
}
/// An arrow or Page key's move: `selection.move` (extending with Shift, jumping with Ctrl), or in
/// Add mode a move of the active cell that keeps the selected areas.
fn move_selection(app: &mut SheetApp, dr: i64, dc: i64, shift: bool, cmd: bool) {
let from = app.session.active().map(|d| if shift { d.selection.moving_end() } else { d.selection.active });
if app.grid.selection_mode == SelectionMode::Add {
add_mode_move(app, dr, dc, shift, cmd);
app.grid.reveal_from = from;
return;
}
let _ = app.session.run("selection.move", json!({"dr": dr, "dc": dc, "extend": shift, "jump": cmd}));
app.grid.ensure_visible = true;
app.grid.reveal_moving_end = shift;
app.grid.reveal_from = from;
}
/// Add mode: Home and Ctrl+Home/Ctrl+End move the active cell as the arrows do, keeping the
/// selected areas. Whether the key was one of those (and so was handled).
fn add_mode_home_end(app: &mut SheetApp, sh: &Sheet, key: egui::Key, cmd: bool) -> bool {
if app.grid.selection_mode != SelectionMode::Add || !(cmd || key == egui::Key::Home) {
return false;
}
let a = app.session.active().map(|d| d.selection.active).unwrap_or_default();
let to = match key {
egui::Key::Home if cmd => CellRef::new(sh.freeze.map(|f| f.0).unwrap_or(0), sh.freeze.map(|f| f.1).unwrap_or(0)),
egui::Key::End => sh.used_range().map(|u| u.end).unwrap_or_default(),
_ => CellRef::new(a.row, 0),
};
add_mode_move(app, i64::from(to.row) - i64::from(a.row), i64::from(to.col) - i64::from(a.col), false, false);
true
}
/// Esc: what [`cancel_pending`] cancels, and the F8 selection modes end.
fn cancel_pending_and_selection_mode(app: &mut SheetApp) {
cancel_pending(app);
let _ = app.run("ui.selectionMode", json!({"mode": "off"}));
}
/// F8 toggles Extend Selection, Shift+F8 Add or Remove Selection.
fn toggle_selection_mode(app: &mut SheetApp, shift: bool) {
let target = if shift { SelectionMode::Add } else { SelectionMode::Extend };
let mode = if app.grid.selection_mode == target { SelectionMode::Off } else { target };
let _ = app.run("ui.selectionMode", json!({"mode": mode.id()}));
}
/// This frame's input events, without those the focused form control took.
fn grid_events(app: &mut SheetApp, ctx: &egui::Context, sh: &Sheet) -> Vec<egui::Event> {
let events = ctx.input(|i| i.events.clone());
+57 -5
View File
@@ -3,7 +3,7 @@ use super::geo::Geo;
use super::interact::{hidden_col_edge, hidden_row_edge};
#[cfg(test)]
use super::show::hidden_around;
use super::{CellRef, Color32, Painter, RangeRef, Rect, Sheet, SheetApp, Stroke, StrokeKind, Tokens, json, pos2, vec2};
use super::{CellRef, Color32, Painter, RangeRef, Rect, SelectionMode, Sheet, SheetApp, Stroke, StrokeKind, Tokens, json, pos2, vec2};
/// Where the active cell is on screen: the whole merged cell when it is part of one.
fn active_rect(geo: &Geo, sh: &Sheet, sel: &gridcraft_engine::Selection) -> Rect {
@@ -190,15 +190,67 @@ fn toggled_ranges(mut ranges: Vec<String>, clicked: String, add: bool) -> Vec<St
ranges
}
/// An arrow (or Page Up/Down, Ctrl+arrow) in Add mode. Without Shift the active cell moves and the
/// selected areas stay, the cell it lands on becoming a provisional last area that the next arrow
/// moves again; with Shift that area grows from its anchor and is kept, so the next arrow starts
/// another one.
pub(super) fn add_mode_move(app: &mut SheetApp, dr: i64, dc: i64, shift: bool, jump: bool) {
app.grid.ensure_visible = true;
app.grid.reveal_moving_end = shift;
if shift {
let _ = app.run("selection.move", json!({"dr": dr, "dc": dc, "extend": true, "jump": jump}));
app.grid.add_pending = None;
return;
}
let Some(mut keep) = app.session.active().map(|d| d.selection.ranges.clone()) else { return };
// Only the provisional area this mode made is dropped, and only while it is still the last area.
if let Some(p) = app.grid.add_pending.take()
&& keep.last() == Some(&p)
{
keep.pop();
}
// The engine works out where the cell lands (hidden rows, merged cells, Ctrl+arrow jumps).
let _ = app.run("selection.move", json!({"dr": dr, "dc": dc, "extend": false, "jump": jump}));
let Some((area, active)) = app.session.active().map(|d| (d.selection.current(), d.selection.active)) else { return };
// Landing on an area already kept leaves it kept: the next arrow doesn't drop it.
let kept = keep.contains(&area);
keep.retain(|r| *r != area);
keep.push(area);
let range = keep.iter().map(|r| r.a1()).collect::<Vec<_>>().join(",");
let _ = app.run("selection.set", json!({"range": range, "active": active.a1()}));
app.grid.add_pending = (!kept).then_some(area);
}
/// The active sheet's areas in Add mode, as `selection.set` takes them; empty in other modes.
pub(super) fn add_mode_base(app: &SheetApp) -> Vec<String> {
if app.grid.selection_mode != SelectionMode::Add {
return Vec::new();
}
let mut ranges = app.session.active().map(|d| d.selection.ranges.iter().map(|x| x.a1()).collect::<Vec<_>>()).unwrap_or_default();
if let Some(pending) = app.grid.add_pending
&& ranges.last().is_some_and(|range| range == &pending.a1())
{
ranges.pop();
}
ranges
}
pub(super) fn select_ranges(app: &mut SheetApp, r: RangeRef, add: bool, active: CellRef) {
let current: Vec<String> =
if add { app.session.active().map(|d| d.selection.ranges.iter().map(|x| x.a1()).collect()).unwrap_or_default() } else { vec![] };
// A clicked area is kept: the next Add mode arrow starts a new one.
app.grid.add_pending = None;
let current: Vec<RangeRef> = if add { app.session.active().map(|d| d.selection.ranges.clone()).unwrap_or_default() } else { vec![] };
let clicked = r.a1();
let ranges = toggled_ranges(current, clicked.clone(), add);
// A click on a cell inside a larger kept area removes that area, as a click on a single-cell area does.
let inside =
(add && current.len() > 1 && r.start == r.end).then(|| current.iter().position(|x| x.a1() != clicked && x.contains(r.start))).flatten();
let ranges: Vec<String> = match inside {
Some(i) => current.iter().enumerate().filter(|(j, _)| *j != i).map(|(_, x)| x.a1()).collect(),
None => toggled_ranges(current.iter().map(|x| x.a1()).collect(), clicked.clone(), add),
};
// A removed area takes the active cell with it; `selection.set` then puts it at the start of the last area.
let params =
if ranges.contains(&clicked) { json!({"range": ranges.join(","), "active": active.a1()}) } else { json!({"range": ranges.join(",")}) };
let _ = app.session.run("selection.set", params);
let _ = app.run("selection.set", params);
}
#[cfg(test)]
+2
View File
@@ -435,6 +435,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Výběr odkazu",
"Calculate" => "Přepočítat",
"Select destination and press Enter or choose Paste" => "Vyberte cíl a stiskněte Enter nebo zvolte Vložit",
"Extend Selection" => "Rozšířit výběr",
"Add or Remove Selection" => "Přidat nebo odebrat výběr",
"General" => "Obecný",
"Number" => "Číslo",
"Currency" => "Měna",
+2
View File
@@ -452,6 +452,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Zeigen",
"Calculate" => "Berechnen",
"Select destination and press Enter or choose Paste" => "Ziel auswählen und die Eingabetaste drücken oder „Einfügen“ wählen",
"Extend Selection" => "Markierung erweitern",
"Add or Remove Selection" => "Markierung hinzufügen oder entfernen",
"General" => "Standard",
"Number" => "Zahl",
"Currency" => "Währung",
+2
View File
@@ -439,6 +439,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Señalar",
"Calculate" => "Calcular",
"Select destination and press Enter or choose Paste" => "Seleccione el destino y presione Entrar o elija Pegar",
"Extend Selection" => "Extender selección",
"Add or Remove Selection" => "Agregar o quitar selección",
"General" => "General",
"Number" => "Número",
"Currency" => "Moneda",
+2
View File
@@ -314,6 +314,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Point",
"Calculate" => "Calculer",
"Select destination and press Enter or choose Paste" => "Sélectionnez la destination et appuyez sur Entrée ou choisissez Coller",
"Extend Selection" => "Étendre la sélection",
"Add or Remove Selection" => "Ajouter ou supprimer la sélection",
"General" => "Standard",
"Number" => "Nombre",
"Currency" => "Monétaire",
+2
View File
@@ -305,6 +305,8 @@ pub(super) const CORE: &[(&str, &str)] = &[
("Point", "ポイント"),
("Calculate", "計算"),
("Select destination and press Enter or choose Paste", "貼り付け先を選び、Enter キーを押すか [貼り付け] を選びます"),
("Extend Selection", "選択範囲の拡張"),
("Add or Remove Selection", "選択範囲の追加または削除"),
("General", "標準"),
("Number", "数値"),
("Currency", "通貨"),
+2
View File
@@ -299,6 +299,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "가리키기",
"Calculate" => "계산",
"Select destination and press Enter or choose Paste" => "대상을 선택하고 Enter 키를 누르거나 [붙여넣기]를 선택하세요",
"Extend Selection" => "선택 영역 확장",
"Add or Remove Selection" => "선택 영역 추가 또는 제거",
"General" => "일반",
"Number" => "숫자",
"Currency" => "통화",
+2
View File
@@ -305,6 +305,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Aanwijzen",
"Calculate" => "Berekenen",
"Select destination and press Enter or choose Paste" => "Selecteer de bestemming en druk op Enter of kies Plakken",
"Extend Selection" => "Selectie uitbreiden",
"Add or Remove Selection" => "Selectie toevoegen of verwijderen",
"General" => "Algemeen",
"Number" => "Getal",
"Currency" => "Valuta",
+2
View File
@@ -299,6 +299,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Apontar",
"Calculate" => "Calcular",
"Select destination and press Enter or choose Paste" => "Selecione o destino e pressione Enter ou escolha Colar",
"Extend Selection" => "Estender Seleção",
"Add or Remove Selection" => "Adicionar ou Remover Seleção",
"General" => "Geral",
"Number" => "Número",
"Currency" => "Moeda",
+2
View File
@@ -301,6 +301,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Указание",
"Calculate" => "Вычисление",
"Select destination and press Enter or choose Paste" => "Выберите место вставки и нажмите Enter или выберите «Вставить»",
"Extend Selection" => "Расширить выделение",
"Add or Remove Selection" => "Добавить или удалить выделение",
"General" => "Общий",
"Number" => "Числовой",
"Currency" => "Денежный",
+2
View File
@@ -304,6 +304,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "Pokaži",
"Calculate" => "Izračunavanje",
"Select destination and press Enter or choose Paste" => "Izaberi odredište i pritisni Enter ili izaberi Nalepi",
"Extend Selection" => "Proširi izbor",
"Add or Remove Selection" => "Dodaj ili ukloni izbor",
"General" => "Opšte",
"Number" => "Broj",
"Currency" => "Valuta",
+2
View File
@@ -299,6 +299,8 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Point" => "指向",
"Calculate" => "计算",
"Select destination and press Enter or choose Paste" => "选择目标位置并按 Enter,或选择“粘贴”",
"Extend Selection" => "扩展式选定",
"Add or Remove Selection" => "添加或删除所选内容",
"General" => "常规",
"Number" => "数值",
"Currency" => "货币",
+5
View File
@@ -420,6 +420,11 @@ pub fn status_bar(app: &mut SheetApp, ui: &mut Ui) {
gridcraft_engine::Mode::Point => "Point",
};
text(ui, egui::RichText::new(app.ui.language.tr(mode)).font(theme::ui_font(12.5)).color(t.text_dim));
// F8 / Shift+F8 selection mode.
if let Some(label) = app.grid.selection_mode.status_text() {
ui.add_space(12.0);
text(ui, egui::RichText::new(app.ui.language.tr(label)).font(theme::ui_font(12.5)).color(t.text_dim));
}
crate::macro_ui::status(app, ui);
if let Some(d) = app.session.active() {
if d.wb.vba_project.is_some() {
+207 -1
View File
@@ -1,10 +1,12 @@
//! Excel keyboard shortcuts (crate::keymap) dispatched through real egui key events.
use egui::{Event, Key, Modifiers};
use egui::{Event, Key, Modifiers, PointerButton};
use egui_kittest::kittest::Queryable as _;
use gridcraft_engine::Session;
use gridcraft_engine::core::CellRef;
use gridcraft_engine::model::BorderStyle;
use gridcraft_ui_egui::SheetApp;
use gridcraft_ui_egui::grid::{Geo, SelectionMode};
use gridcraft_ui_egui::keymap::{Shortcut, lookup};
use serde_json::json;
@@ -77,6 +79,210 @@ fn copy_formula_from_above_and_function_keys() {
assert_eq!(h.state().session.active().unwrap().wb.sheets[0].zoom, 110);
}
fn selection_a1(h: &Harness) -> String {
h.state().session.active().unwrap().selection.a1()
}
fn active_a1(h: &Harness) -> String {
h.state().session.active().unwrap().selection.active.a1()
}
fn mode(h: &Harness) -> SelectionMode {
h.state().grid.selection_mode
}
#[test]
fn f8_extend_selection_extends_from_the_anchor_until_turned_off() {
let mut h = harness(book("A1"));
assert!(h.query_by_label("Extend Selection").is_none());
key(&mut h, Key::F8, Modifiers::NONE);
assert_eq!(mode(&h), SelectionMode::Extend);
assert!(h.query_by_label("Extend Selection").is_some(), "the status bar shows the mode");
key(&mut h, Key::ArrowRight, Modifiers::NONE);
key(&mut h, Key::ArrowDown, Modifiers::NONE);
assert_eq!(selection_a1(&h), "A1:B2");
assert_eq!(active_a1(&h), "A1", "the active cell stays on the anchor");
// Ctrl+arrow extends to the edge of the data, as Ctrl+Shift+arrow does.
key(&mut h, Key::ArrowDown, CTRL);
assert_eq!(selection_a1(&h), "A1:B3");
// F8 again ends the mode: arrows move again.
key(&mut h, Key::F8, Modifiers::NONE);
assert_eq!(mode(&h), SelectionMode::Off);
assert!(h.query_by_label("Extend Selection").is_none());
key(&mut h, Key::ArrowRight, Modifiers::NONE);
assert_eq!(selection_a1(&h), "B1");
// Esc ends it too, and keeps the extended selection.
key(&mut h, Key::F8, Modifiers::NONE);
key(&mut h, Key::ArrowRight, Modifiers::NONE);
key(&mut h, Key::Escape, Modifiers::NONE);
assert_eq!(mode(&h), SelectionMode::Off);
assert_eq!(selection_a1(&h), "B1:C1");
key(&mut h, Key::ArrowDown, Modifiers::NONE);
assert_eq!(selection_a1(&h), "B2");
}
#[test]
fn shift_f8_add_to_selection_builds_areas_with_arrow_keys() {
let mut h = harness(book("A1:A2"));
key(&mut h, Key::F8, Modifiers::SHIFT);
assert_eq!(mode(&h), SelectionMode::Add);
assert!(h.query_by_label("Add or Remove Selection").is_some(), "the status bar shows the mode");
assert!(h.query_by_label("Extend Selection").is_none());
// Arrows move the active cell and keep A1:A2; the next arrow moves the new cell again.
key(&mut h, Key::ArrowRight, Modifiers::NONE);
assert_eq!(selection_a1(&h), "A1:A2,B1");
key(&mut h, Key::ArrowRight, Modifiers::NONE);
assert_eq!(selection_a1(&h), "A1:A2,C1");
assert_eq!(active_a1(&h), "C1");
// Shift+arrow grows that area from it and keeps it.
key(&mut h, Key::ArrowRight, Modifiers::SHIFT);
assert_eq!(selection_a1(&h), "A1:A2,C1:D1");
assert_eq!(active_a1(&h), "C1");
// The next arrow starts a third area.
key(&mut h, Key::ArrowDown, Modifiers::NONE);
key(&mut h, Key::ArrowDown, Modifiers::NONE);
assert_eq!(selection_a1(&h), "A1:A2,C1:D1,C3");
// F8 switches to Extend mode, and Shift+F8 twice ends Add mode.
key(&mut h, Key::F8, Modifiers::NONE);
assert_eq!(mode(&h), SelectionMode::Extend);
key(&mut h, Key::F8, Modifiers::SHIFT);
assert_eq!(mode(&h), SelectionMode::Add);
key(&mut h, Key::F8, Modifiers::SHIFT);
assert_eq!(mode(&h), SelectionMode::Off);
assert!(h.query_by_label("Add or Remove Selection").is_none());
key(&mut h, Key::ArrowRight, Modifiers::NONE);
assert_eq!(selection_a1(&h), "D3", "with the mode off an arrow drops the areas");
}
#[test]
fn editing_a_cell_ends_the_selection_mode() {
let mut h = harness(book("A1"));
key(&mut h, Key::F8, Modifiers::NONE);
key(&mut h, Key::F2, Modifiers::NONE);
assert!(h.state().editor.is_some());
assert_eq!(mode(&h), SelectionMode::Off);
key(&mut h, Key::Escape, Modifiers::NONE);
key(&mut h, Key::F8, Modifiers::SHIFT);
h.input_mut().events.push(Event::Text("7".into()));
h.run_steps(2);
assert!(h.state().editor.is_some(), "typing starts an edit");
assert_eq!(mode(&h), SelectionMode::Off);
}
fn click(h: &mut Harness, a1: &str) {
let at = {
let app = h.state();
let sheet = app.session.active().unwrap().wb.active().unwrap();
Geo::new(sheet, app.grid.rect.unwrap(), app.view().scroll).cell_rect(sheet, CellRef::parse(a1).unwrap()).center()
};
h.input_mut().events.push(Event::PointerMoved(at));
h.run_steps(1);
for pressed in [true, false] {
h.input_mut().events.push(Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE });
h.run_steps(1);
}
h.run_steps(1);
}
#[test]
fn clicks_extend_or_add_in_the_selection_modes() {
let mut h = harness(book("B2"));
key(&mut h, Key::F8, Modifiers::NONE);
click(&mut h, "D4");
assert_eq!(selection_a1(&h), "B2:D4", "in Extend mode a click extends from the anchor");
assert_eq!(mode(&h), SelectionMode::Extend, "the mode stays on");
key(&mut h, Key::F8, Modifiers::SHIFT);
click(&mut h, "F6");
assert_eq!(selection_a1(&h), "B2:D4,F6", "in Add mode a click adds an area");
// (Not a double-click: that would edit the cell.)
h.state_mut().grid.last_click = None;
click(&mut h, "F6");
assert_eq!(selection_a1(&h), "B2:D4", "and a click on a selected area removes it");
// An arrow after a click keeps the clicked areas.
click(&mut h, "H8");
key(&mut h, Key::ArrowDown, Modifiers::NONE);
assert_eq!(selection_a1(&h), "B2:D4,H8,H9");
// Moving back onto the kept H8 and off again keeps it.
key(&mut h, Key::ArrowUp, Modifiers::NONE);
assert_eq!(selection_a1(&h), "B2:D4,H8");
key(&mut h, Key::ArrowDown, Modifiers::NONE);
assert_eq!(selection_a1(&h), "B2:D4,H8,H9");
}
/// A point in the column header band, above `col`'s cells.
fn column_header_point(h: &Harness, col: &str) -> egui::Pos2 {
let app = h.state();
let sheet = app.session.active().unwrap().wb.active().unwrap();
let geo = Geo::new(sheet, app.grid.rect.unwrap(), app.view().scroll);
let x = geo.cell_rect(sheet, CellRef::parse(&format!("{col}1")).unwrap()).center().x;
egui::pos2(x, geo.head_top() + 4.0)
}
fn drag(h: &mut Harness, from: egui::Pos2, to: egui::Pos2) {
h.input_mut().events.push(Event::PointerMoved(from));
h.run_steps(1);
h.input_mut().events.push(Event::PointerButton { pos: from, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE });
h.run_steps(1);
h.input_mut().events.push(Event::PointerMoved(to));
h.run_steps(2);
h.input_mut().events.push(Event::PointerButton { pos: to, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE });
h.run_steps(2);
}
#[test]
fn add_mode_header_drag_keeps_the_earlier_areas() {
let mut h = harness(book("B2"));
key(&mut h, Key::F8, Modifiers::SHIFT);
click(&mut h, "F6");
assert_eq!(selection_a1(&h), "B2,F6");
h.state_mut().grid.last_click = None;
let (from, to) = (column_header_point(&h, "H"), column_header_point(&h, "J"));
drag(&mut h, from, to);
assert_eq!(selection_a1(&h), "B2,F6,H:J", "a header drag in Add mode adds its columns and keeps the areas already selected");
}
#[test]
fn add_mode_header_drag_replaces_only_the_provisional_area() {
let mut h = harness(book("B2"));
key(&mut h, Key::F8, Modifiers::SHIFT);
key(&mut h, Key::ArrowRight, Modifiers::NONE);
assert_eq!(selection_a1(&h), "B2,C2");
h.state_mut().grid.last_click = None;
let (from, to) = (column_header_point(&h, "H"), column_header_point(&h, "J"));
drag(&mut h, from, to);
assert_eq!(selection_a1(&h), "B2,H:J", "the header drag replaces the provisional area while retaining earlier areas");
}
#[test]
fn add_mode_shift_home_and_end_keep_the_earlier_areas() {
let mut home = harness(book("B2"));
key(&mut home, Key::F8, Modifiers::SHIFT);
click(&mut home, "F6");
key(&mut home, Key::Home, Modifiers::SHIFT);
assert_eq!(selection_a1(&home), "B2,A6:F6", "Shift+Home extends the active area and keeps the earlier area");
let mut end = harness(book("B2"));
key(&mut end, Key::F8, Modifiers::SHIFT);
click(&mut end, "F6");
key(&mut end, Key::End, CTRL_SHIFT);
assert_eq!(selection_a1(&end), "B2,C3:F6", "Ctrl+Shift+End extends the active area and keeps the earlier area");
}
#[test]
fn selection_mode_command_sets_and_reports_without_a_dialog() {
let mut h = harness(book("A1"));
assert_eq!(h.state_mut().run("ui.selectionMode", json!({})), Ok(json!({"mode": "off"})));
assert_eq!(h.state_mut().run("ui.selectionMode", json!({"mode": "extend"})), Ok(json!({"mode": "extend"})));
h.run_steps(2);
assert!(h.query_by_label("Extend Selection").is_some());
assert_eq!(h.state_mut().run("ui.selectionMode", json!({"mode": "add"})), Ok(json!({"mode": "add"})));
assert!(h.state_mut().run("ui.selectionMode", json!({"mode": "sideways"})).is_err());
assert!(h.state_mut().run("ui.selectionMode", json!({"mode": 3})).is_err());
assert_eq!(mode(&h), SelectionMode::Add, "a bad mode changes nothing");
assert_eq!(h.state_mut().run("ui.selectionMode", json!({"mode": "off"})), Ok(json!({"mode": "off"})));
assert!(h.state().dialog.is_none());
}
#[test]
fn windows_and_mac_variants() {
let cmd = CTRL;
+5 -3
View File
@@ -92,7 +92,7 @@ this logic, with one undo step.
| Shortcuts bound to commands | 200+ documented shortcuts per platform | audited below (#110): shortcuts whose feature exists are bound, with the exceptions listed; the rest wait for their features |
| Ctrl+arrow, Ctrl+Shift+arrow, Ctrl+Home/End, Ctrl+Shift+Home/End, Page Up/Down, Alt+Page | yes | done |
| Ctrl+1, Ctrl+; and Ctrl+Shift+; , Ctrl+D/R, Ctrl+E, Ctrl+T/L, Ctrl+K, Ctrl+Shift+L, Ctrl+Shift+~!@#$%^&_ | yes | done |
| F2, F3, F4, F5, F7, F9 family, Shift+F2/F3/F10/F11, F12 | yes | done; F11 chart sheet, F8 extend mode, F4 Repeat missing |
| F2, F3, F4, F5, F7, F9 family, Shift+F2/F3/F10/F11, F12 | yes | done; F8 / Shift+F8 extend and add modes with their status bar text; F11 chart sheet, F4 Repeat missing |
| Mac-specific (Cmd variants, Control variants, Fn keys) | yes | done where a feature exists (`keymap.rs` picks the Mac variant) |
| Sequential Alt access keys (Alt, H, N, …) on every ribbon tab | yes | 364-sequence keytip table for all tabs: per-control badges, prefix waiting, dropdowns open for editing (type/arrows/Enter), pending bindings for not-yet-built commands; letters also work with left Alt held (Alt+H, O, A), as in Excel; each Borders letter (H, B, …) draws its own preset, H, B, M opens Format Cells on the Border tab, and Erase Border, Line Color and Line Style are reserved; QAT/Backstage excluded |
| Requests | — | #110 (more shortcuts and hot keys), #33 (sequential Alt; initial support landed in #43) |
@@ -147,8 +147,9 @@ A character egui has no key for (`č`, `ö`, `<`) falls back to the key's positi
| Shift+F10, Alt+Shift+F10, Ctrl+F1 | Shift+F10, Cmd+Option+R | context menu, Error Checking, ribbon | **added** |
| Ctrl+Alt+Shift+P | Cmd+Option+Shift+P | Python mode on or off | **added** |
| F3 | not checked | Paste Name dialog, only when the workbook has names: OK puts the name at the caret of the formula being edited (or starts `=Name`), Paste List writes each name and what it refers to from the active cell (`formulas.pasteName`) | **added** |
| F1, F4 (repeat), F6 / Shift+F6, F8 / Shift+F8, F11, End mode | same | help, Repeat, pane cycling, extend/add mode, chart sheet | missing (no such feature yet) |
| F1, F3, F4 (repeat), F6 / Shift+F6, F8 / Shift+F8, F11, End mode | same | help, Paste Name, Repeat, pane cycling, extend/add mode, chart sheet | missing (no such feature yet) |
| F8, Shift+F8 | same | Extend Selection (arrows, Page keys, Ctrl+arrows, Home and clicks extend from the anchor) and Add or Remove Selection (arrows move the active cell and keep the areas, Shift+arrows grow a new area, a click adds or removes an area); the status bar names the mode; the key again, Esc or editing a cell ends it (`ui.selectionMode`) | **added** |
| F1, F4 (repeat), F6 / Shift+F6, F11, End mode | same | help, Repeat, pane cycling, chart sheet | missing (no such feature yet) |
| F1, F3, F4 (repeat), F6 / Shift+F6, F11, End mode | same | help, Paste Name, Repeat, pane cycling, chart sheet | missing (no such feature yet) |
| Ctrl+Q | Control+Q (Cmd+Q stays Quit) | Quick Analysis | **added** (#791) |
| Ctrl+A after a function name, Ctrl+Alt+P | same | Function Arguments, tooltips | missing |
| Ctrl+Shift+A after a function name | Control+Shift+A | argument names: `=SUMIF(` becomes `=SUMIF(range,criteria,sum_range)`, the `(` added when missing; one Undo takes them back | **added** |
@@ -327,6 +328,7 @@ scrollbar bugs 2–4 · pixel/feel pass against observed Excel 7–12.
| 2026-10-24 | minor | Outline Settings (Data ▸ Outline ▸ Settings, `data.outlineSettings`): clearing Summary rows below detail or Summary columns to right of detail puts the − / + buttons on the line above or left of each group, and Hide Detail, Show Detail and the level buttons mark that line collapsed. Changing a direction moves the marks of collapsed groups. Read and written as `outlinePr summaryBelow` / `summaryRight` |
| 2026-10-23 | minor | F3, Formulas › Use in Formula › Paste Names… and Alt+M, S, P open the Paste Name dialog (F3 only when the workbook has names). It lists the workbook's names and the active sheet's own in alphabetical order, hidden names left out; OK or a double-click puts the selected name at the caret of the formula being edited, in place of selected text, or starts `=Name` in the active cell (`formulas.pasteName` `{name}`), and Paste List writes each name and the text of what it refers to in two columns from the active cell (`{list: true}`). While a dialog is open over the edit, the cell editor takes no keys, and Cancel leaves the selected text selected. The Use in Formula menu lists the same names and inserts at the caret too (`formulas.useInFormula`); it used to list hidden names and other sheets' names, the menu added the name at the end of the text, and the command replaced the text being edited |
| 2026-10-23 | minor | Conditional Formatting ▸ New Rule, formula: clicking a cell on the grid writes its absolute reference at the formula box's caret (`=$B$2`, an empty box starts with `=`), a drag writes a range (`$B$2:$C$4`) and a second click replaces the reference just written, as in Excel ("Selecting cells on the worksheet inserts absolute cell references"). The selection the rule applies to doesn't move, and the box keeps the keyboard. After an operand (`=A1>5`) the click does nothing (#2348) |
| 2026-10-15 | minor | F8 Extend Selection and Shift+F8 Add or Remove Selection modes, shown in the status bar (`ui.selectionMode`) |
| 2026-10-23 | minor | Frozen panes: Page Up, Ctrl+Up and Shift variants that move from the scrolled rows into the frozen ones bring the scrolled rows back to the top, so the rows in between are seen again (Page Up from far down used to end on row 1 with the view still a page down); Ctrl+Left and Alt+Page Up do the same for frozen columns. Other ways of selecting a frozen cell (click, Find, Go To, Undo, formula pointing) leave the view where it is |
| 2026-10-23 | minor | After a left-drag of the fill handle an Auto Fill Options button sits below the filled cells; its menu redoes the fill as Copy Cells, Fill Series, Fill Formatting Only or Fill Without Formatting (undoes the drag's fill, then `edit.autoFill` in that mode). It goes away when the workbook changes or the selection moves (#1403) |
| 2026-10-24 | minor | When the fill starts from a date, the right-drag fill menu and the Auto Fill Options button also offer Fill Days, Fill Weekdays (Saturday and Sunday skipped), Fill Months and Fill Years (`edit.autoFill` with `mode` set to `days`, `weekdays`, `months` or `years`). A lone date steps by one unit; two or more dates step by the difference between the first two in that unit, or one unit when they fall in the same one. Fill Months and Fill Years keep the day of the month, clamped to the month's last day. Every fill by months or years (these two, a drag of dates a month apart, and Series by Month or Year) keeps the time of day of a date with a time, which used to be dropped |