Skip to main content

Module typing

Module typing 

Expand description

A person typing in one field is one change in History: the keystrokes of a formula, a title or a paragraph, however many words and undo steps they took, are one row until the person stops.

Undo keeps its own, finer steps (a word at a time): this decides only what History lists as one change. A change continues its author’s typing when it is a typing edit (a text replacement or splice made as part of a gesture, by a person) of the same field as that author’s previous change, made within TYPING_PAUSE_MS of it. Any other change by the author (an edit elsewhere, a verb, a version they named) ends the typing; another person’s changes in between do not. Every input is in the change itself, so every peer, and every reader of the log (the toolkit’s HistorySource rows, restoring one row’s changes), finds the same runs.

Constants§

TYPING_PAUSE_MS
How long a person may stop typing in a field and still be writing the same thing: long enough to think through the rest of a formula or a sentence, short enough that coming back to the field later is a change of its own.