limejelly / Backlight-for-XCode

Highlights the current editing line in Xcode
411 stars 72 forks source link

Fix #27 #31

Closed tyeen closed 9 years ago

tyeen commented 9 years ago

Remove the highlighted line when editor lost focus. The behaviour is the same as Overlay mode.

What caused the issue

When using Underneath mode, the current line is highlighted by the current editor's layout manager. The editor is not aware when the focus changed to somewhere else, so the highlighted line remains there.

Why not happen in Overlay mode

In Overlay mode, when focus changed to another editor, the NSWindowDidBecomeKeyNotification will fire in the new editor. Then in moveBacklightInTextView: method, [self.currentBacklightView removeFromSuperview]; will execute and the old highlighted line will be removed.