Vsvim: Strange behavior when using '/' to search

Created on 30 Jan 2018  路  7Comments  路  Source: VsVim/VsVim

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

bug

Most helpful comment

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

All 7 comments

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.

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

@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.

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.

@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?

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.

Closing stale investigation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredpar picture jaredpar  路  5Comments

jaredpar picture jaredpar  路  5Comments

keithn picture keithn  路  3Comments

keithn picture keithn  路  4Comments

ArnisL picture ArnisL  路  5Comments