Topic: VS 2019 <Esc> does not exit insert mode in HTML files - causes error
Hi Jon - sorry, I know escape handling is your favorite topic.
I've been seeing this error ever since I moved to VS2019 (16.8.4).
I'm on version 3.11 of viemu.
Escape does not work to leave insert mode in html files and causes the following error(s) in VS. FYI, I don't have any of the typical extensions that affect this sort of thing (resharper, intellisense extensions, etc). Just naked VS.
Esc works fine in all other file types that I've tried.
By the way, I've noticed that it works correctly if you have any text selected. At that point, the 'SelectionCancel' behavior seems to kick in and it works.
I've tried mapping something to '<S-Up> <esc', but the Shift-up (to select some text) doesn't work.
Thanks!
<entry>
<record>2871</record>
<time>2021/02/28 17:29:41.089</time>
<type>Information</type>
<source>Web Editor</source>
<description>System.Runtime.InteropServices.InvalidOleVariantTypeException: Specified OLE variant is invalid.
 at System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant(IntPtr pSrcNativeVariant)
 at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.TranslateInputArg(Guid& guidCommandGroup, UInt32 commandID, IntPtr variantIn)
 at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.Exec(Guid& guidCommandGroup, UInt32 commandID, UInt32 commandExecOpt, IntPtr variantIn, IntPtr variantOut)</description>
</entry>
<entry>
<record>2872</record>
<time>2021/02/28 17:29:41.114</time>
<type>Information</type>
<source>Web Editor</source>
<description>System.Runtime.InteropServices.InvalidOleVariantTypeException: Specified OLE variant is invalid.
 at System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant(IntPtr pSrcNativeVariant)
 at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.TranslateInputArg(Guid& guidCommandGroup, UInt32 commandID, IntPtr variantIn)
 at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.Exec(Guid& guidCommandGroup, UInt32 commandID, UInt32 commandExecOpt, IntPtr variantIn, IntPtr variantOut)</description>
</entry>
<entry>
<record>2873</record>
<time>2021/02/28 17:29:41.525</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.Runtime.InteropServices.InvalidOleVariantTypeException: Specified OLE variant is invalid.
 at System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant(IntPtr pSrcNativeVariant)
 at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.TranslateInputArg(Guid& guidCommandGroup, UInt32 commandID, IntPtr variantIn)
 at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.Exec(Guid& guidCommandGroup, UInt32 commandID, UInt32 commandExecOpt, IntPtr variantIn, IntPtr variantOut)
 at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.CommandHandlerServiceAdapter.<>c__DisplayClass18_0.<Exec>g__executeNextCommandTarget|1()
 at Microsoft.VisualStudio.UI.Text.Commanding.Implementation.EditorCommandHandlerService.ExecuteStartingAtIndex[T](Func`3 argsFactory, FrugalList`1 buffersAndHandlers, Int32 startIndex, EditorCommandHandlerServiceState state, Action nextCommandHandler)
 at Microsoft.VisualStudio.UI.Text.Commanding.Implementation.EditorCommandHandlerService.<>c__DisplayClass14_0`1.<ExecuteStartingAtIndex>b__2()
 at Microsoft.WebTools.Languages.Shared.Editor.Completion.TypingCommandHandler.ExecuteChainedCommand(EditorCommandArgs args, Action nextCommandHandler)
 at Microsoft.WebTools.Languages.Shared.Editor.Completion.TypingCommandHandler.ExecuteCommand(EscapeKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
 at Microsoft.VisualStudio.UI.Text.Commanding.Implementation.EditorCommandHandlerService.<>c__DisplayClass14_1`1.<ExecuteStartingAtIndex>b__0()
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call, Predicate`1 exceptionFilter)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)</description>
</entry>
Last edited by jbirdman (2021-03-01 16:17:07)