public void Close_ShouldCallLeaveAndClose() { var normal = CreateAndAddNormalMode(MockBehavior.Loose); _vimBuffer.SwitchMode(ModeKind.Normal, ModeArgument.None); normal.Setup(x => x.OnLeave()).Verifiable(); normal.Setup(x => x.OnClose()).Verifiable(); _vimBuffer.Close(); normal.Verify(); }
void IVimBufferCreationListener.VimBufferCreated(IVimBuffer buffer) { var textView = buffer.TextView; textView.Closed += (x, y) => { buffer.Close(); _bufferMap.Remove(buffer); }; }
void IVimBufferCreationListener.VimBufferCreated(IVimBuffer buffer) { var textView = buffer.TextView; textView.Closed += (x, y) => { buffer.Close(); _filterMap.Remove(buffer); }; }
void IVimBufferCreationListener.VimBufferCreated(IVimBuffer vimBuffer) { var textView = vimBuffer.TextView; textView.Closed += (x, y) => { vimBuffer.Close(); _toSyncSet.Remove(vimBuffer); _vimBufferToCommandTargetMap.Remove(vimBuffer); }; }
void IVimBufferCreationListener.VimBufferCreated(IVimBuffer buffer) { GetOrUpdateServiceProvider(buffer.TextBuffer); // Have to wait for Aggregate focus before being able to set the VsCommandFilter var textView = buffer.TextView; textView.GotAggregateFocus += new EventHandler(OnGotAggregateFocus); textView.Closed += (x, y) => { buffer.Close(); _filterMap.Remove(buffer); ITextViewDebugUtil.Detach(textView); }; ITextViewDebugUtil.Attach(textView); }
public void TearDown() { Dispatcher.CurrentDispatcher.DoEvents(); _buffer.Close(); }
public void TearDown() { _buffer.Close(); }