Type Editor / @type-editor/dom-change-util / parse-change/get-preferred-diff-position
parse-change/get-preferred-diff-position
Functions
| Function | Description |
|---|---|
Determines the preferred position and side for diff calculation. The diff algorithm needs to know where the user's cursor was to make better decisions about how to align changes. This function determines the preferred position based on recent keypress activity:
The preferred side ('start' or 'end') affects how ambiguous changes are resolved in the diff algorithm. See findDiff for how these values are used |