I’ve now fixed all remaining issues with my Current Line Highlighting extension for Visual Studio 2010. Besides fixing all build issues, I started running into issues where IWpfTextViewLineCollection.GetMarkerGeometry() was returning null when the text snapshot was empty (like an empty line).

I reworked the code to avoid this call and instead manually create a new geometry directly out of the line bounds (which I would always do anyway to adjust the margins). This seems to work pretty well for now. Here’s a screenshot of how it looks like on the new build:

LineExt

As usual, the updated code can be found in the GitHub repository.


Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.