heyman / heynote

A dedicated scratchpad for developers
https://heynote.com
Other
3.86k stars 194 forks source link

Implemented codemirror extension to keep initial indentation for wrapped lines #192

Open Maran1947 opened 7 months ago

Maran1947 commented 7 months ago

Resolves #187

heyman commented 7 months ago

187 is about displaying an indentation for lines that wraps, so this is not really a solution for it.

heyman commented 7 months ago

Though this may also be desirable, I need to think more about that.

NoahAndrews commented 7 months ago

I thought that this was the original request as well. I think they're both desirable behaviors.

Maran1947 commented 7 months ago

Sorry, I was misunderstood the issue. So, It appears there are two separate scenarios regarding indentation to address:

  1. Upon hitting 'Enter', the new line fails to adopt the indentation of the preceding line.
  2. Fails to maintain proper indentation for lines that wrap or extend beyond the width of the viewport.

And the issue is about scenario 2, isn't?

jacobcarpenter commented 6 months ago

And the issue is about scenario 2, isn't it?

Correct. #187 is talking about the word-wrap column. If you look closely at the first screenshot in that issue, you'll see that the line number in the margin shows that line 3 wrapped (by leaving a gap in the line numbering for the next line before showing 4).