diff --git a/lib/models/transform.js b/lib/models/transform.js index eee92c2e0..92c3385e9 100644 --- a/lib/models/transform.js +++ b/lib/models/transform.js @@ -198,8 +198,8 @@ class Transform extends new Record(DEFAULT_PROPERTIES) { // Apply each of the steps in the transform, arriving at a new state. state = steps.reduce((memo, step) => this.applyStep(memo, step), state) - // If the selection has changed, clear any existing cursor marks. - if (state.selection != selection) { + // If there are cursor marks and they haven't changed, remove them. + if (state.cursorMarks && state.cursorMarks == cursorMarks) { state = state.merge({ cursorMarks: null })