Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior when using '/' to search #2072

Closed
drhoda opened this issue Jan 30, 2018 · 7 comments
Closed

Strange behavior when using '/' to search #2072

drhoda opened this issue Jan 30, 2018 · 7 comments
Labels

Comments

@drhoda
Copy link

drhoda commented Jan 30, 2018

Recently, I cannot pinpoint when it started, when I try using /searchString to look for searchString in a file that is open in the editor I see this in the status line: /g/n/i/r/t/S/h/c/r/a/e/s . Hitting return at this point searches for 'g'. I accidentally found a work around. If I type //searchString, then the search proceeds as expected. This always happens, it doesn't matter what the search string is. This happens with ? searches also.

I don't remember changing any key mappings or making any modifications to my vim startup files. This happens to me in Visual Studio 2015 and Visual Studio 2017. I have vsvim version 2.5.0.0 built on 1/8/2018.

Thanks for any tips that will help me avoid the extra / to start my searches.

Dave

@jaredpar jaredpar added the bug label Jan 31, 2018
@jaredpar
Copy link
Collaborator

Thanks fo reporting. I've noticed a few issues with the status bar in the last release. I haven't seen this specific issue yet but hoping it's just another symptom of the problems I'm already looking into.

@jaredpar jaredpar added this to the 2.6.0 milestone Jan 31, 2018
@drhoda
Copy link
Author

drhoda commented Jan 31, 2018

Thanks for the reply and for a great tool. vsvim helps my vi trained fingers and brain work somewhat efficiently in visual studio.

@gwojan
Copy link

gwojan commented Jan 31, 2018

@jaredpar, I'm not sure if this is related but I just started getting an error dialog popping up when I try and execute a search using /. It's basically just the generic dialog that says check the ActivityLog.xml so I'm including it.

The error occurs after I type a character after the /. Once the dialog is closed I can continue working as usual with no additional errors.

image

ActivityLog.zip

BTW, this is also with the latest builds from AppVeyor.

@jaredpar
Copy link
Collaborator

jaredpar commented Feb 2, 2018

That looks like it's just a bug in VS itself. Here is the stack trace from that exception:

System.ArgumentException: Value does not fall within the expected range.
   
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   
at Microsoft.VisualStudio.Editor.Implementation.FontsAndColorsHelper.FillDictionaryForeground(ColorableItemInfo[] info, ResourceDictionary dictionary, Boolean fHasHierarchy)
   
at Microsoft.VisualStudio.Editor.Implementation.FontsAndColorsHelper.FillResourceDictionaryForegroundAndBold(ColorableItemInfo[] info, ResourceDictionary dictionary, Boolean fHasHierarchy)
   
at Microsoft.VisualStudio.Editor.Implementation.DataStorage.TryGetItemValueFromSubCategoryOfTextEditor(String itemKey, ResourceDictionary itemValue)
   
at Microsoft.VisualStudio.Editor.Implementation.DataStorage.TryGetItemValue(String itemKey, ResourceDictionary& itemValue)
   
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.CreateResourceDictionaryFromProvision(String key)
   
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.GetProperties(String key)
   
at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.GetProperties(String key)
   
at Microsoft.VisualStudio.Text.AdornmentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.GetAdornmentForGeometry(Geometry geometry, IMappingTagSpan`1 tag)
   
at Microsoft.VisualStudio.Text.AdornmentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.AddAdornment(SnapshotSpan span, IMappingTagSpan`1 tag, Dictionary`2 lineCache)
   
at Microsoft.VisualStudio.Text.AdornmentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.AddAdornment(IMappingTagSpan`1 tag, Dictionary`2 lineCache, NormalizedSnapshotSpanCollection applicabilitySpans, NormalizedSnapshotSpanCollection formattedSpanAsNormalizedSnapshotSpanCollection)
   
at Microsoft.VisualStudio.Text.AdornmentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.AddAdornments(NormalizedSnapshotSpanCollection spans, Double left, Double right)
   
at Microsoft.VisualStudio.Text.AdornmentLibrary.TextMarkers.Implementation.TextMarkerVisualManager.OnBatchedTagsChanged(Object sender, BatchedTagsChangedEventArgs e)
   
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)
--- End of stack trace from previous location where exception was thrown ---
   
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Doesn't look like VsVim is involved here.

@gwojan
Copy link

gwojan commented Aug 20, 2018

@jaredpar I finally took the time to try and debug this issue and discovered it is only when I'm using the Dark Color Theme for VS2017.

Also, I have set incsearch in my _vsvimrc file and with the Dark Color Theme incremental search highlighting doesn't work.

Should I open new issues?

@jaredpar
Copy link
Collaborator

Should I open new issues?

For the initial bug report here I think we need to open a VS feedback issue. Visual Studio is the one throwing an exception there and not much we can do to prevent it.

@jaredpar jaredpar modified the milestones: 2.6.0, 2.7.0 Oct 23, 2018
@ricksladkey ricksladkey modified the milestones: 2.7.0, 2.8.0 May 1, 2019
@ricksladkey ricksladkey removed this from the 2.8.0 milestone May 11, 2019
@ricksladkey
Copy link
Collaborator

Closing stale investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants