void IVimBufferCreationListener.VimBufferCreated(IVimBuffer vimBuffer) { // Let the command margin get into a known state before we disable it. _vimProtectedOperations.BeginInvoke( () => _commandMarginUtil.SetMarginVisibility(vimBuffer, _vimApplicationSettings.UseEditorCommandMargin), DispatcherPriority.ApplicationIdle); }
void IVimBufferCreationListener.VimBufferCreated(IVimBuffer vimBuffer) { Action doCheck = () => { if (vimBuffer.IsClosed) { return; } if (ConflictingKeyBindingState == ConflictingKeyBindingState.HasNotChecked) { if (_vimApplicationSettings.IgnoredConflictingKeyBinding) { IgnoreAnyConflicts(); } else { RunConflictingKeyBindingStateCheck(vimBuffer); } } }; // Don't block startup by immediately running a key binding check. Schedule it // for the future _protectedOperations.BeginInvoke(doCheck); }
private void ConnectToOleCommandTarget(IVimBuffer vimBuffer, ITextView textView, IVsTextView vsTextView) { var broker = _displayWindowBrokerFactoryServcie.GetDisplayWindowBroker(textView); var vimBufferCoordinator = _bufferCoordinatorFactory.GetVimBufferCoordinator(vimBuffer); var result = VsCommandTarget.Create(vimBufferCoordinator, vsTextView, _textManager, _adapter, broker, _keyUtil, _commandTargetFactoryList); if (result.IsSuccess) { // Store the value for debugging _vimBufferToCommandTargetMap[vimBuffer] = result.Value; } // Try and install the IVsFilterKeys adapter. This cannot be done synchronously here // because Venus projects are not fully initialized at this state. Merely querying // for properties cause them to corrupt internal state and prevents rendering of the // view. Occurs for aspx and .js pages Action install = () => VsFilterKeysAdapter.TryInstallFilterKeysAdapter(_adapter, vimBuffer); _protectedOperations.BeginInvoke(install); }