Skip to content

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoventura committed Nov 20, 2024
1 parent f61c455 commit d89f015
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Monaco/ReactMonacoEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ export function ReactMonacoEditor({
const shouldEnableWordWrapButton = () => {
const lineCount = editor?.getModel()?.getLineCount()
if (!lineCount) return false

for (let i = 1; i <= lineCount; i++) {
const lineContent = editor?.getModel()?.getLineContent(i)
if (lineContent && lineContent.length >= 10000) {
return false
}
}

return true
}

Expand Down

0 comments on commit d89f015

Please sign in to comment.