* AutoFormat As You Type: optional period with double-space, off by default (#2848)
* Test the double-space option through the AutoCorrect dialog (#2848)
* File > Options > Proofing: an AutoCorrect Options button opens the dialog (#476)
* #2848: report doubleSpacePeriod in tools.autocorrect's params doc and result
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
With *Bold* and _italic_ as real formatting on, the opening mark is not
part of the word AutoCorrect reads, so typing `*teh end* ` gives bold
`The end ` instead of `teh end `. A sentence capital is decided from the
text before the mark.
Match format_range for whole-cell segments and ordinary targets, including empty
paragraphs. Partial text columns leave their unselected marks out of the check.
Keep the large-run fixture prefix mark blue so it cannot mask the tail regression.
Before the fix, whole-cell and ordinary-mark regressions failed while the other5
highlight controls passed. All7 now pass, including inherited/empty cells,
unselected neighbours, empty-only ranges, partial columns and Undo/Redo.
Full cargo xtask ci passed all8 gates with serial tests. Previous head's CodeRabbit
docstring measurement95.24% exceeds80%; all3 new tests have documentation.
Native Word comparison remains pending. No new interface strings.
Resolve highlight runs one at a time without the formatting-state query cap.
Pin mixed and inherited tails at 10000/10001/10002 runs, including Undo/Redo.
Document the changed command/session/helpers and explicit palette setter behavior.
Validation: red regression at10001 runs; all3 highlight tests pass after fix.
Full cargo xtask ci passed all8 gates:3963 passed,0 failed,4 existing ignored.
RUST_TEST_THREADS=1. Local named-function doc audit:13/13 documented; CodeRabbit
uses its own analyzer. Native Word comparison remains pending.
The border-line AutoFormat (`---` and the others) and the `+---+` table
AutoFormat leave a numbered paragraph alone, but they read only the
paragraph's own numbering. A heading numbered through a heading-linked
Multilevel List carries its number in its style, so both AutoFormats
applied there. At the top of the document, Enter after `---` in such a
heading removed the characters, switched off the heading's number and
left no border, and the next text went into the heading.
Both checks now read the paragraph's resolved numbering, as the list
AutoFormat does.
Remember the session highlighter choice and toggle it when no explicit colour is given. Keep explicit palette/automation setters and No Color semantics, and preserve undoable formatting.
Two command/key regressions and four headless UI screenshots passed. Full cargo xtask ci passed all 8 steps with 3962 passed, 0 failed, 4 existing ignored using RUST_TEST_THREADS=1. Initial parallel run hit an unchanged Russian suggestion timing assertion; isolated unchanged binary passed at13ms. Native Word comparison pending.
With Track Changes on, the border-line AutoFormat (`---` and the others)
and the `+---+` table AutoFormat removed the typed characters outright, so
Reject All could not bring them back. At the top of a story the border
was not recorded as a formatting change either.
Both AutoFormats now delete the characters through the tracked deletion
that Backspace uses: characters the same author inserted are removed, and
other characters are marked deleted. A border at the top of a story is
recorded as a tracked formatting change, and the caret goes after any
characters marked deleted. The table is inserted untracked, as Insert >
Table inserts one. A line that holds a tracked deletion no longer
triggers either AutoFormat, so Enter after the deleted characters is a
plain Enter.
AutoFormat As You Type gains "Built-in Heading styles", off by default,
as `headingStyles` on `tools.autocorrect` and a checkbox under "Apply as
you type" in the AutoCorrect dialog.
With it on, Enter in an empty paragraph right after a line of one to five
words that ends in a letter or digit makes that line Heading 1. One or two
tabs before the line make it Heading 2 or 3, and the tabs are removed. The
line must be a Normal paragraph of the main text outside a list. The caret
stays in the empty paragraph after the heading, and Undo right after
brings back the tabs and the Normal style while the Enter stays. With Track
Changes on, the tabs are marked deleted (or removed, when the same author
inserted them) and the style change is a tracked formatting change; a line
holding a tracked deletion stays as it is. A heading style locked by
formatting restrictions is not applied.
AutoFormat As You Type gains "Set left- and first-indent with tabs and
backspaces", off by default, as `tabIndent` on `tools.autocorrect` and a
checkbox under "Automatically as you type" in the AutoCorrect dialog.
With it on, Tab before the first line of a paragraph with text indents the
first line by one default tab stop, and Tab before a later line (after a
line break or where the text wraps) indents the whole paragraph. A second
Tab before an indented or hanging first line also indents the whole
paragraph. Backspace at the start of the paragraph takes the first-line
indent back, then the paragraph's own left indent one tab stop at a time.
An empty paragraph and Tab inside a line still take a tab character.
While formatting is limited to the document's styles, Tab and Backspace
work as with the option off.
ROADMAP.md and docs/typing-parity.md now carry 2026-10-24 in their status
lines and a revision history row for the AutoCorrect fix. docs/gaps.md has
no entry for it.
After a `*word*` or `_word_` span is converted on a space, punctuation
or Enter, the word without its marks is AutoCorrected as before:
replacements, capitals, ordinals and links (`*teh* ` becomes bold
`The `). Undo right after still restores the marks in one step, and
after Enter the Enter stays. A marked web address becomes a link
without carrying its bold or italic into the text typed after it.
AutoCorrect found the start of the word before the caret one byte after the
last white-space character. After a no-break space (two bytes in UTF-8) or an
ideographic space (three bytes) that offset is inside the character, so the
word could not be read and AutoCorrect left it as typed: no replacement, no
sentence capital, no ordinal superscript and no link.
The word now starts after the whole white-space character. A typing test
covers a replacement, a sentence capital and a web address after each of the
two spaces, and an ordinal after each.
AutoFormat As You Type has a new option, "*Bold* and _italic_ as real
formatting". When it is on and a word is finished by a space,
punctuation or Enter, text enclosed in asterisks becomes bold and text
enclosed in underscores becomes italic, for plain and complex-script
text, and the marks are removed. The opening mark has to start a word
and the enclosed text may not start or end with a space, so 2*3* and
file_name_ stay as typed, and so do marks around a picture, field or
content control.
Undo right after brings the marks back; after Enter, the Enter stays.
The paragraph Enter makes is formatted as after a plain Enter. With
Track Changes on, only marks the current author typed as tracked
insertions are converted, and nothing is converted while formatting is
limited to the document's styles.
The option is off by default. Scripts set it with "boldItalic" on
tools.autocorrect, and the AutoCorrect dialog shows it on the AutoFormat
As You Type tab.
The engine reroutes the connectors glued to the shapes they join after every
command that can move a shape. The reroute can move a connector even when the
command itself changed nothing, and that movement has to be undoable: the
step the command's dispatch pushed may not be put away before the reroute has
run.
The command's own change is now decided first, so the reroute still sees the
new layout, and the undo step is put back only after the reroute, when
nothing moved.
The typing behaviour is pinned in tests_typing.rs, as a typing fix is.
The undo step was pushed before the command ran, so a command that changed
nothing still added a step, marked the document edited, forced a relayout and
threw the redo stack away. Five hundred of them filled the whole undo stack
and pushed the user's own edits out of it, so they could never be undone
again.
The document, the selection, the formatting waiting at the caret and the
column selection are now compared with what they were before the command ran.
When nothing changed, the step is put back, the redo stack survives, and the
document is not marked edited.
crates/ui-egui/src/backstage.rs: t03's bidi_display on the Recent names over t09's borrowed name/path. people.toml: union. Tests: both tracks' tests kept whole. Docs: status lines combined, rows unioned or word-merged.
docs/typing-parity.md: status line kept main's, #2388 added as a previous change; both revision rows.
docs/ui-parity.md: status line kept main's, #2388 added as a previous change; Keytips row keeps main's text plus the AltGr clause; both revision rows.
"- ", "1. " and the other list triggers only turned into a bullet or
numbered item when they were the paragraph's entire content (caret at
the paragraph's end). Typing one at the start of a paragraph that
already has more text after the caret — the common case of going back
to bulletize an existing line — left it as literal text instead.
Checked in Word for Windows: it triggers on the paragraph's first
characters regardless of what follows, keeping the rest of the text
after the new list marker.
Fix: match the pattern against the text up to the caret (not the whole
paragraph), and strip only that matched prefix, not the paragraph's
entire text.
Regression test reverse-verified: fails with the old whole-paragraph
check reinstated (the old behavior literally reproduces the report —
"- " stays as typed text instead of becoming a bullet), passes with the
fix. Full cargo xtask ci passes except the pre-existing, machine-
specific a_thai_run_with_latin_falls_back_to_one_face failure (also
fails identically on a clean upstream/main checkout).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* Layout: a word after a slash wraps whole, like Word (#2963)
UAX #14 (LB13) forbids a break between a space and a slash, and the break
after a slash is dropped on purpose (Word keeps "and/or" whole). Together
"caption /word" had no break opportunity at all, so a line too short for
both filled letter by letter and split the word. Add the break before a
slash that follows whitespace and starts a word.
Co-Authored-By: Claude <noreply@anthropic.com>
* Layout: no break before a slash after a no-break space (#2963)
The break before a slash word took any whitespace, U+00A0, U+2007 and
U+202F included, so "Nr. /12" could wrap after the no-break space.
Only a breakable space counts now. The parity checklist lists the rule
on its own row as untested against Word.
Co-Authored-By: Claude <noreply@anthropic.com>
* Layout: test the slash word in a fixed-width table cell (#2963)
The report came from a table cell, where the cell's own width is the
line width.
Co-Authored-By: Claude <noreply@anthropic.com>
* Docs: gaps and typing parity for the slash-word break (#2963)
Doc wording taken from #2994 (maxm11), with the test names of this PR.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude (ThinkSystem) <claude@thinksystem.local>
Co-authored-by: Claude <noreply@anthropic.com>