Weird home key behaviour on heading line

The :up_left_arrow: or Home key normally puts the cursor at the end of the beggining of the line. On SB editor, if the current line is an heading, it puts the cursor just after the first # char.

I get the logic for the h1 (although puting it after the first space char would be more useful), but it seems weird for the other heading levels.

Yes, I think this is a result of the “special” CSS styles applied to make the headline align with the rest of the content and pull the hashes to the left to make that happen.

Feel free to create a github issue for this, it’s a bug.

This seems to be the relevant routine. Probably something with the css and line wrapping if I‘d had to guess