diff --git a/crates/ely-lok/src/client/tests/workbook.rs b/crates/ely-lok/src/client/tests/workbook.rs index 41fa9e9..d8cebba 100644 --- a/crates/ely-lok/src/client/tests/workbook.rs +++ b/crates/ely-lok/src/client/tests/workbook.rs @@ -256,3 +256,21 @@ fn commands_from_one_read_run_together_and_hovering_changes_nothing() { assert!(crate::is_stale(&stale), "{stale}"); assert_eq!(only(&mut worker), ["One", "Two", "U"], "nothing else was renamed"); } + +#[test] +fn a_header_act_after_a_click_is_not_stale() { + if install().is_none() { + eprintln!("SKIP: no pinned LOK build"); + return; + } + let (_dir, mut worker, doc) = open_book(SHEETS); + let read = worker.now(&doc).expect("the state"); + // A click moves the revision; rows and columns stay. + for kind in [0, 1] { + let click = crate::Mouse { kind, x: 500, y: 500, count: 1, buttons: 1, modifiers: 0 }; + worker.post_mouse(&read, click).expect("clicks"); + } + assert_ne!(worker.now(&doc).expect("the state"), read, "the click counts as a change"); + worker.run(&read, "select.column", &["2", "0"]).expect("the column header still selects"); + worker.run(&read, "columns.width", &["800", "3"]).expect("the column's width still sets"); +} diff --git a/crates/ely-lok/src/commands.rs b/crates/ely-lok/src/commands.rs index 09162d0..6e6e833 100644 --- a/crates/ely-lok/src/commands.rs +++ b/crates/ely-lok/src/commands.rs @@ -61,7 +61,7 @@ pub struct Command { /// Arguments that count things as a read saw them. const NUMBERED: &[&str] = &[ - "Index", "nTabNumber", "TabNo", "Part", "Row", "Col", "Column", "StartColumn", "StartRow", "EndColumn", "EndRow", + "Index", "nTabNumber", "TabNo", "Part", "StartColumn", "StartRow", "EndColumn", "EndRow", ]; impl Command { @@ -306,7 +306,9 @@ mod tests { assert!(find("sheet.delete").expect("the row").addressed(&["1"])); assert!(!find("cell.enter").expect("the row").addressed(&["1"])); assert!(find("notes.set").expect("the row").addressed(&["text", "1"]), "a slide by number"); - assert!(find("select.row").expect("the row").addressed(&["3", "0"]), "a row by number"); + // Clicks renumber no row or column: never stale. + assert!(!find("select.row").expect("the row").addressed(&["3", "0"]), "a header row"); + assert!(!find("columns.width").expect("the row").addressed(&["500", "2"]), "a column's width"); assert!(!find("rows.height_selected").expect("the row").addressed(&["500"]), "a size names nothing"); } diff --git a/tasks/BUGS.md b/tasks/BUGS.md index 7e68afe..faf551c 100644 --- a/tasks/BUGS.md +++ b/tasks/BUGS.md @@ -14,7 +14,7 @@ - [x] T-04 从不调用 `setClientZoom`,内核命中与几何按默认缩放算 — R2.16 已修(worker 每次报可见区前 setClientZoom) - [x] T-05 文档尺寸按内核像素取整,表尾被裁 — 内核尺寸按其测量时的比例换到当前比例(加载即设比例、缩放即改比例并重测、迟到的测量也换算);R1–R4 缩放后未重测、表尾锚点被截、连续缩放迟到、首次测量无比例与文件超行;R5 PASS - [ ] T-06 滚轮向下被内核平铺区卡住 -- [ ] T-07 表头点选、行高列宽拖动是“按编号的命令”,而每次点击与拖选都推进修订,紧接着的表头操作被当作过期拒绝 +- [x] T-07 表头点选、行高列宽拖动是“按编号的命令”,而每次点击与拖选都推进修订,紧接着的表头操作被当作过期拒绝 — 行列号不再算作按编号的命令;R1 PASS - [ ] T-08 自动筛选的列菜单对光标所在的表而不是按钮所在的表筛选、排序 - [ ] T-09 导入文本文件时整文件的 UTF-8 校验在界面线程跑 - [ ] T-10 CSV 导入对话框开着时打开任何别的对话框,待导入的文件静默消失 diff --git a/tasks/reviews/T-07-r1.md b/tasks/reviews/T-07-r1.md new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/tasks/reviews/T-07-r1.md @@ -0,0 +1 @@ +PASS