Rubberduck
Rubberduck copied to clipboard
Code Inspections not highlighting code on double click
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:
- Run a parse
- Click on a code inspection
- '....'
- 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.
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.
@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’ve 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
I have more Infos and a workaround: a) When I double-click on a code-inspection the module will be shown and the correct module lines will be shown in which the inspection is located. b) Then when I click "outside" the lines which are affected by the code-inspection, none codelines will be selected. b) Then when I llooonnnggggg click "inside" the lines which are affected by the code-inspection, the correct codelines will be selected (this is what a double-click in the window "code inspection" should do) b) Then when I short click "inside" the lines which are affected by the code-inspection, none codelines will be selected.
This video shows what I mean
Hope it helps
Version 2.5.2.5984 Betriebssystem: Microsoft Windows NT 10.0.19043.0, x64 Hostprodukt: Microsoft Office 2013 x86 Hostversion: 15.0.5349.1000 Hostprogramm: MSACCESS.EXE