This project is read-only.
1

Resolved

Duplicate QuickFix to add missing reference

description

Source:
TextView.TextBuffer.Replace(new Span(0, TextView.TextSnapshot.Length), value);
Without a reference to CoreUtility.
  1. This will, correctly (I assume), report four errors for the missing reference to IPropertyOwner from various parts of the line.
If you place the cursor anywhere between the first dot and the end of the word Replace, it will offer two identical quick fixes to add the reference.

Strangely, at least on my Surface 3, the identical error tooltips on the identical quickfixes have different word wrapping

file attachments

comments

srivatsn wrote Oct 31, 2014 at 8:09 PM

Jon, can you please try to repro this?

jmarolf wrote Nov 10, 2014 at 10:58 PM

I'm having difficulty reproing this issue. Do you have a sample project I could look at?

SSL wrote Nov 11, 2014 at 1:41 AM

Here is my original source file, wrapped in a standalone testcase.
Reproduced on CTP4.

srivatsn wrote Dec 2, 2014 at 1:06 AM

With Preview, this now reports four fixes - one for each error in the line. We made a change to report fixes for all errors in a line in the margin lightbulb. If you hover over a particular squiggle, it should only show you the fixes for the squiggles that are at that location. In this case, it looks the squiggles overlap (one for TextView.TextBuffer.Replace overlaps with ones for just TextBuffer and for just Replace) and so we show two fixes, when you hover over those (Note, in preview, there's a bug over hover lightbulbs not being clickable - that's fixed now).

It is by design that we show fixes for multiple overlapping issues together. In this case, it happens to be quite silly in that the same error is overlapping and produces the same fix but you can easily imagine cases where you would want the current behavior.

SSL wrote Dec 2, 2014 at 3:35 AM

Yes; in general, it's nicer to see every fix from a single keystroke.
(I had noticed this change, and appreciate it)

Can you dedupe identical fixes?