mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
A caret Backspace or Delete replaces no selection, so `beforeinput` reports the bare caret and the previous derivation produced a negative inserted length and fell back to the ambiguous scan. The delete half of the defect survived, and the component test missed it by pre-expanding the selection to the span the engines never report. The range for a caret delete now comes from the direction `inputType` names and the number of characters the draft actually lost, measured rather than assumed to be one, so a grapheme, word, or line deletion sizes correctly. Only the insert and delete families are recorded; a history replay reports wherever the caret sits and would name a wrong span while passing every check. Component tests cover the caret Backspace, Delete, and word-delete gestures, and an assembled browser scenario drives them as real key presses, which is the only place an engine's reported range is observable.