Skip to content

Commit 0ce227c

Browse files
committed
Fixed range error
1 parent 0e07cd4 commit 0ce227c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/remix-ui/editor/src/lib/remix-ui-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ export const EditorUI = (props: EditorUIProps) => {
896896
const docs = editorRef.current.getModel().getValueInRange(new monacoRef.current.Range(docsRange.start.line, docsRange.start.column, funcRange.start.line, 1000))
897897
const oldLineCount = (docs || '').split('\n').length - 1
898898
const ranges = [
899-
new monacoRef.current.Range(docsRange.start.line + 1, 0, docsRange.start.line + 1, 0),
899+
new monacoRef.current.Range(docsRange.start.line + 1, 0, docsRange.start.line + newLineCount, 1000),
900900
new monacoRef.current.Range(docsRange.start.line + newLineCount + 1, 0, docsRange.start.line + newLineCount + oldLineCount, 1000)
901901
]
902902

0 commit comments

Comments
 (0)