Closed kushagrawal071 closed 3 years ago
Hi, I am trying to modify the selection below : <CodeMirror [...] selection={{ ranges: [{ anchor: {ch: 8, line: 5}, head: {ch: 37, line: 5} }], focus: true // defaults false if not specified }} onSelection={(editor, data) => {}} />
I keep the selection ranges in the state right now, but when the state is updated it's not changed.
I am trying to create a code correlation kind of thing where I have to modify the selection in one window by clicking on the gutter of another window.
Any suggestions on how I can do this?
I am having the same issue and can replicate with version 7.2.1.
7.2.1
I worked around by adding key=Date.now() in CodeMirror
Hi, I am trying to modify the selection below : <CodeMirror [...] selection={{ ranges: [{ anchor: {ch: 8, line: 5}, head: {ch: 37, line: 5} }], focus: true // defaults false if not specified }} onSelection={(editor, data) => {}} />
I keep the selection ranges in the state right now, but when the state is updated it's not changed.
I am trying to create a code correlation kind of thing where I have to modify the selection in one window by clicking on the gutter of another window.
Any suggestions on how I can do this?