Rubberduck: Code Inspections not highlighting code on double click

Created on 7 Nov 2019  路  9Comments  路  Source: rubberduck-vba/Rubberduck

Rubberduck version information

Version 2.4.1.5182
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4912.1000
Host Executable: EXCEL.EXE

Description
Double clicking an inspection in the Code Inspections window causes a very brief flicker of highlight, but leaves the offending code unhighlighted.

To Reproduce
Steps to reproduce the behavior:

  1. Run a parse
  2. Click on a code inspection
  3. '....'
  4. Watch it flicker

Expected behavior
This is a regression somewhere along the line. Double-clicking an inspection should leave the impacted code highlighted.

Screenshots
This was recorded in build .5170, but I did test & duplicate in .5182 - I just didn't re-record it.
Code Inspection Issue

Logfile
RubberduckLog.txt

Additional context
_Loads_ of inspections in this project... Just confirmed the same behavior in Access. Wasn't there last time I looked at inspections, but that has been a... _while_...

Additional, additional context
This happens the vast majority of the time, but it's not a 100% failure rate. On occasion, it will leave the code highlighted. It's probably a 95+% failure rate, though.

bug

Most helpful comment

I'd think that is fixable, since it seems to have been broken (recently-ish). This is not something I'd ever had issue with before. I tried using the CI window docked once, hated it and it's been undocked ever since. I _know_ I've used the CI in this fashion before - many times before, and the code's always been highlighted because the VBE has gotten the focus from the tool window after the double-click. I'm not sure how or why it was broken, but it used to work.

I'll be happy to go back through my collection of pre-release builds and install & test until I find one that works, if that would help.

All 9 comments

@daFreeMan Is it just flickering because the Code Inspections window is getting focus and not the IDE? I had similar thoughts till I realized which had focus. Clicking the title bar of the IDE to give it focus shows that the correct inspection is selected.

Yup, you are correct - when I click the IDE title bar, the code does appear highlighted. However, this is new behavior. Previous versions (not sure how previous) would show the code highlighted whether I manually clicked the VBE or not. I suppose they left the VBE as the focused window instead of the CI tool window (which I do not use docked).

That's a VBIDE quirk, nothing appears to be selected unless the code pane has focus. Presumably the behavior returns to normal when the toolwindow is docked? Confirmed: docking the toolwindow fixes the focusing issue.

I don't think this is something we can fix.

I'd think that is fixable, since it seems to have been broken (recently-ish). This is not something I'd ever had issue with before. I tried using the CI window docked once, hated it and it's been undocked ever since. I _know_ I've used the CI in this fashion before - many times before, and the code's always been highlighted because the VBE has gotten the focus from the tool window after the double-click. I'm not sure how or why it was broken, but it used to work.

I'll be happy to go back through my collection of pre-release builds and install & test until I find one that works, if that would help.

Given that it recently got a horizontal scrollbar, it would be easy to download the version before that merge and see if it behaves or not.

I鈥檝e noticed this behavior for quite some time. Before the scroll bars for certain.

Build .4993: Works
Build .5033: Works
Build .5081 (got the "new pre-release available" pop-up, that surprised me!): Works
Build .5094: Works
Build .5096: Works
Build .5096: Works
Build .5097: Works (and found new issues Yay! or is that Boo... ?)
Build .5105: Works (and I went back to the previously grouped list of issues?)
Build .5115: Works
Build .5130: Works (that "new pre-release" pop up is gettin' kinda naggy at this point... :/)
Build .5131: Works
Build .5132: BROKEN
Build .5170: BORKEN
Build .5182: BORKEN
Build .5196: OBRKEN

Looks like 5132 broke things.

I'll investigate the 5096->5097->5105 changes and report as a separate issue if necessary

Probably, the following event handler is to blame.
https://github.com/glowingrunes/Rubberduck/blob/302122d512cbfd7e1f4491f77ddda1cba9f3f038/Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml.cs#L15

It was introduces to avoid that the event reaches the scroll viewer. However, that seems to also have swallowed the focus change.

Hi,

for me the double click doesn't work for several versions. Today I tried the lastes version and still the double click in Code Inspections doesn't work.
Can I help you with further information?

Version 2.5.2.5936
Betriebssystem: Microsoft Windows NT 10.0.19042.0, x64
Hostprodukt: Microsoft Office 2013 x86
Hostversion: 15.0.5267.1000
Hostprogramm: MSACCESS.EXE

Was this page helpful?
0 / 5 - 0 ratings

Related issues

susnick picture susnick  路  3Comments

Gener4tor picture Gener4tor  路  3Comments

ChrisBrackett picture ChrisBrackett  路  3Comments

Gener4tor picture Gener4tor  路  3Comments

ghost picture ghost  路  3Comments