Closed kentrh closed 3 years ago
@kentrh
Thank you for your PR.
It has been merged to develop
branch.
It would have been better to extract the line number from the existing line number layer, but I couldn't find a way to do this, so instead I calculate the line numbers based on the existing layers' Y coordinate and padding between the layers. This may cause the relative numbers sometimes to be off, but it works most of the time.
I wonder if it would be possible to cast lineNumbersHostingLayer
from CALayer
-> CATextLayer
and get the line number through the .string
property?
Apologies for not trying it myself. Hoping this could help with #344.
It would have been better to extract the line number from the existing line number layer, but I couldn't find a way to do this, so instead I calculate the line numbers based on the existing layers' Y coordinate and padding between the layers. This may cause the relative numbers sometimes to be off, but it works most of the time.
I wonder if it would be possible to cast
lineNumbersHostingLayer
fromCALayer
->CATextLayer
and get the line number through the.string
property?Apologies for not trying it myself. Hoping this could help with #344.
Hi, yeah, I tried that, but it didn't work. The funniest thing, though, was that I got that to work one time while I was debugging and stepping through, but I only got it working once, and I could not reproduce it, so I gave up after a while.
An effort to solve #28.
It is not a perfect solution, but it works better than not having any relative numbers in my opinion.
set relativenumber
in.xvimrc
CATextLayer
for each lineXVimWindow.resetEvaluatorStack
is called, but there may be a better placement than this, but I'm not sure where that would be. Would've been nice if someone with a bit more experience with this project could have a look at this or point me in the right direction.