What probably matters to youSection of the release
What
$.prompt.fill lets a plugin (an add-on) or a script place text into the box where you type your prompt. Until now it accepted mode and decorations. It now also takes an optional cursor value, which sets where the text cursor (caret) lands:
cursor must be a whole number of zero or more. It counts positions in the text as UTF-16 units, which for most text means characters.
A value that is not a whole number is rejected with "cursor must be an integer", through the same error path as the other fields.
If no cursor is given, the caret ends after the placed text, as before.
The plugin hook that injects text into the prompt now passes cursor along with mode and decorations, and the returned result includes cursor when one was given.
Why
Plugins and scripts that pre-fill the prompt can now leave the cursor in a useful place, such as inside a template where you are meant to type, instead of always at the end.