ViewUpdate

class ViewUpdate(val session: EditorSession, val state: EditorState, val transactions: List<Transaction>, val viewportChanged: Boolean = false, val heightChanged: Boolean = false, val focusChanged: Boolean = false)

Describes an update to the editor.

Created for every Transaction dispatched to EditorSession. Plugins receive this via PluginValue.update.

Constructors

Link copied to clipboard
constructor(session: EditorSession, state: EditorState, transactions: List<Transaction>, viewportChanged: Boolean = false, heightChanged: Boolean = false, focusChanged: Boolean = false)

Properties

Link copied to clipboard

The combined set of document changes from all transactions in this update.

Link copied to clipboard

Whether any transaction changed the document.

Link copied to clipboard

Whether the editor became focused or unfocused.

Link copied to clipboard

Whether the editor geometry (height/width) changed.

Link copied to clipboard

The state configuration changed (extensions were reconfigured).

Link copied to clipboard

Whether any transaction changed the selection.

Link copied to clipboard

The session that was updated.

Link copied to clipboard

The state before the transactions.

Link copied to clipboard

The new editor state (after the transactions).

Link copied to clipboard

The transactions applied in this update (may be empty for view-only changes).

Link copied to clipboard

Whether the viewport or visible ranges changed.