mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: The functions in the library cannot be modified after being defined (#1938)
This commit is contained in:
parent
3ea41c3297
commit
7f0547a8b8
|
|
@ -22,7 +22,11 @@ defineOptions({ name: 'CodemirrorEditor' })
|
|||
function getRangeFromLineAndColumn(state: any, line: number, column: number, end_column?: number) {
|
||||
const l = state.doc.line(line)
|
||||
const form = l.from + column
|
||||
return { form: form > l.to ? l.to : form, to: end_column ? l.from + end_column : l.to }
|
||||
const to_end_column = l.from + end_column
|
||||
return {
|
||||
form: form > l.to ? l.to : form,
|
||||
to: end_column && to_end_column < l.to ? to_end_column : l.to
|
||||
}
|
||||
}
|
||||
|
||||
const regexpLinter = linter(async (view) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue