crashmoney / obsidian-typewriter

Typewriter is an Obsidian theme designed for a focused writing experience.
GNU General Public License v3.0
91 stars 17 forks source link

[BUG] Line highlight/Vim cursor is broken on Legacy Mode #3

Closed RobertoGongora closed 2 years ago

RobertoGongora commented 2 years ago

Describe the bug

I had to enable Legacy Mode to make the Typewriter scroll plugin work again, but the line highlight started to work very funky in the legacy editor.

image

https://user-images.githubusercontent.com/1845147/147216726-33eeabc7-4070-4867-bdbc-b0fdd1a5a693.mov

Apparently the vim cursor itself is the one that's broken, the highlighted line is correct but the vim cursor appears elsewhere.

To Reproduce

Steps to reproduce the behavior:

  1. Enable Vim Keybinds
  2. Enable Legacy Mode
  3. Move cursor around different headings
  4. The highlighted line will move to the line below the heading, and this can be repeated several times and the highlight will keep moving down

If you switch to the default obsidian theme, the issue resolves itself.

Information

This only started happening after the recent Live Preview update.

Workaround

As a workaround, I had to enable the Live Preview mode and use it in Source Mode (Because Live Preview is really bad imo), but this is not optimal because the heading styles are very different from what I was used to, and the line highlight is gone.

image
crashmoney commented 2 years ago

I'm able to reproduce this bug. The issue appears to be with the CSS rules for headers. I've just pushed an update that fixed this in my testing. Could you update the theme and let me know whether it works? Thanks for reporting the bug!

crashmoney commented 2 years ago

Also, the line highlight now works in the new editor :)

RobertoGongora commented 2 years ago

I've just updated the theme and I can confirm that this now works perfectly in Legacy Mode and in Source Mode!

Thanks for the quick fix, your theme has really helped me focus on my writing and enjoy using Obsidian. I appreciate your hard work!