uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.69k stars 135 forks source link

EditorView.lineWrapping keeps growing inside same line number rather than pushing it to next one #612

Closed rufatZZ closed 11 months ago

rufatZZ commented 11 months ago

First of all thanks for great library with full of features. Appreciating for the work 🙏🏼

Problem: I'm new to using the library, but noticed one thing. In my code example there is few long lines. I'm using wrap lines extension, but it keeps growing inside same line number (1st line). Shouldn't it push it to new line? (2,3,4...)

using v4, here is re-producable code example: https://stackblitz.com/edit/react-vycf3s?file=src%2FApp.js

Screenshot of the issue:

Screenshot 2023-12-27 at 11 31 49
jaywcjlove commented 11 months ago
image

You don't have a line break in your string.

@rufatZZ This is correct

rufatZZ commented 11 months ago

@jaywcjlove oh i see. added \n fixed issue for this cases. Thanks 🙏🏼