surdu / scroll-marker

Provides scrollbar highlight functionality for Atom Editor

Home Page:https://atom.io/packages/scroll-marker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

marker position is wrong when folding code blocks

zypA13510 opened this issue · comments

In Atom, the body of functions/objects etc. can be folded into one line by clicking the arrow beside line number (I think this is part of the core functionalities). Marker created by scroll-marker will be at wrong position if code blocks are folded (more obvious if you fold a large chunk of code).

I think there would be two things that need to be changed:

  1. The calculation of marker's vertical position needs to account for folding.
  2. If any marker would be set on a folded (invisible) line, show it on the first line of that block instead.
commented

Good catch @zypA13510 ! I could of swear this was fixed. I'll take a look one of these days! Thank you!

commented

Just tried to fix this, and I'm afraid this one will be tricky to fix: the search from Atom doesn't update it's marker layer. Basically, after folding, it still insists that there are markers at those lines ...

I will try some more tricks, just wanted to give you an update.