Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.cm.somethingSelected() || pos.line != this.cm.lastLine()) {
return CodeMirror.Pass
}
if (view.state.selection.$anchor.parentOffset) {
const pos = view.state.selection.$anchor.pos
view.dispatch(
view.state.tr.setSelection(Selection.near(
this.view.state.doc.resolve(pos - 1),
-1
) as any)
)
}
if (exitCode(view.state, view.dispatch)) {
return view.focus()
} else if (exitCodeHard(view.state, view.dispatch)) {
return view.focus()
}
},
})
"Ctrl-Enter": () => {
if (exitCode(view.state, view.dispatch)) view.focus()
}
})
"Ctrl-Enter": () => {
if (exitCode(view.state, view.dispatch)) view.focus()
},
})