sabof / project-explorer

A project explorer sidebar
266 stars 17 forks source link

Highlight line when cursor moves (if hl-line-mode is on) #42

Closed katspaugh closed 7 years ago

katspaugh commented 9 years ago

Resolves #40

This seems to work. I checked that if hl-line-mode or global-hl-line-mode is off, the function does nothing.

katspaugh commented 9 years ago

There's some weird behavior when the opened file is in a subdirectory, though:

Is it related to pe/hl-line-range?

sabof commented 9 years ago

IDK, have you tried removing it?

sabof commented 9 years ago

Also, the return value is important. At the moment it's discarded.

katspaugh commented 9 years ago

Yes, if I remove pe/hl-line-range, the problem is gone. But then it highlights folded directory not full-length (which I guess is why you introduced it in the first place):

Also, the return value is important. At the moment it's discarded.

Do I understand right, that it should return nil?

sabof commented 9 years ago

Can you try figuring out what goes wrong? Not always nil. Store the result of the last expression, and use it a the return value.

katspaugh commented 9 years ago

Sorry, I've been busy lately, but I'm keeping tabs on this!

katspaugh commented 8 years ago

Hey Evgkeni,

Sorry for the huge delay.

I decided to cheat a little and just call hl-line-highlight in the beginning of the function to avoid messing with the return value. Do you think it's acceptable?