wolray / symbol-overlay

Highlight symbols with keymap-enabled overlays
346 stars 42 forks source link

symbol-overlay-idle-time can now be nil without error for instant highlighting #45

Closed walseb closed 5 years ago

walseb commented 5 years ago

I want the highlighting to be instant but if i set symbol-overlay-idle-time to 0 it doesn't work, if I set it to nil i get an error and if I set it to 0.001 it spams the highlight function leading to lots garbage collections even when i'm not doing anything. This makes it run the highlighting function every keypress if symbol-overlay-idle-time is nil and the selected word has changed. A problem with this is that you have to set it to nil before enabling the mode for this to work as intended, but I'm not sure if this is worth fixing

wolray commented 5 years ago

Thanks for your PR, but I still think it is not worthy to fix this corner case, which might bring more problems.