justmoon / relative-numbers

Relative line numbers package for Atom
https://atom.io/packages/relative-numbers
MIT License
37 stars 16 forks source link

Absolute Numbers Mismatch at Collapsed Functions #33

Closed Semnodime closed 6 years ago

Semnodime commented 7 years ago

Im not sure whether this is a bug or a feature: When activating relative numbers in a python file with collapsed functions, the current line value for "absolute line" displays correctly. Though when showing absolute numers by either entering vim insert mode or activating permanent absolute number view in the settings, the whole (collapsed) function counts as one line regardless of its size.

justmoon commented 7 years ago

Hmm, I don't use collapsed functions, so this may be a bug. What's the behavior if you don't have relative-numbers installed? Ideally, that's what we should match for absolute line numbers.

Semnodime commented 7 years ago

So without the relative numbers the number-bar looks like this: (In all examples there is one / the same collapsed function) grafik With relative numbers everything seems fine… grafik But once you activate vim-mode’s insert mode the following is happening: grafik Now, the absolute number isn’t quite correct which can be irritating when debugging with absolute line numbers and without awareness of this behavior. I expected picture 3 to show the same behavior as picture 1

justmoon commented 7 years ago

Gotcha, this is definitely a legitimate issue then. I won't have time to look at the causes myself anytime soon, but happy to accept a PR if anyone is reading this.