7

We are attempting to expand text in Visual Studio. Our current attempt consists of creating transparent intraline adornments at certain points in the text.

We have just stumbled upon a disadvantage to this method. Namely that when the given text has a background classification attached to it, the classification breaks and the result looks like this:

bug

We are currently researching possible ways of solving this by:

  1. Inspecting the current classification of the text and drawing a colored intraline adornment.
  2. Drawing the background manually, by drawing in an adornment layer below the text.

However, both of these solutions seem very hacky.
What would be the best way of going about solving this problem?

Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
Daniel
  • 153
  • 4
  • I asked someone on the VS team about this kind of problem (in my case highlighting the full line for Markdown codeblocks), and they said to use an adornment. Look at the current line highlight feature in your favorite decompiler for an example. I've never actually used adornments. – SLaks Feb 03 '15 at 15:55

1 Answers1

4

You're asking how to hack around a standing limitation in the editor, so there isn't a great way :-/

My background color fix extension does what you're suggesting in #2, so you could start from there. I haven't tested it since VS2010 or so, so it may fail in interesting and exciting ways.

Noah Richards
  • 6,777
  • 2
  • 31
  • 28