forgecrafted / rulerz

[Looking for maintainer] A simple Atom package to mark your cursor position with a ruler.
MIT License
6 stars 7 forks source link

Makes sure that the ruler shows when typing #11

Closed JohnMurga closed 9 years ago

JohnMurga commented 9 years ago

The optimizations to the line handling in Atom mean that the ruler will not draw reliably, if for example you scroll down a file, search, re-size the window, etc.

By putting the insert here it makes sure the ruler gets redrawn when the cursor moves, which is good enough for me right now. My understanding of the appendChild(), is that it'll move the element as opposed to coping, although it doesn't cover some of the cases.

cmtonkinson commented 9 years ago

Good catch. I can reproduce what [I think] you're talking about: when scrolling or opening new files, any .tile with logical buffer content hides the ruler. Unfortunately simply re-calling @insert() doesn't seem to do the trick in every case, as you mention.

cmtonkinson commented 9 years ago

FYI: Looks like a simple z-index in the stylesheet did the trick here. Also, I refactored the getEditor and getEditorRoot down to a single method.

JohnMurga commented 9 years ago

Awesome :-) Works beautifully now

cmtonkinson commented 9 years ago

Whew, 1.0 here we come!

Thanks for all your help and feedback @JohnMurga. Much appreciated!