Lock selection on active line

I am using CodeMirror v6.

I have an active row in an EditorView. How to make it impossible to select another row?

You can refer to the following link。Through the following scheme, the distinction between read-only lines and writable lines has been realized on my product
https://discuss.codemirror.net/t/how-to-make-certain-ranges-readonly-in-codemirror6/3400/9