Skip to content

Commit 14dec2b

Browse files
committed
Don't scroll the selection into view in nocursor mode
Closes #6561
1 parent 6aa4fef commit 14dec2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model/selection_updates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function setSelectionNoUndo(doc, sel, options) {
106106
(cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1)
107107
setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true))
108108

109-
if (!(options && options.scroll === false) && doc.cm)
109+
if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor")
110110
ensureCursorVisible(doc.cm)
111111
}
112112

0 commit comments

Comments
 (0)