Exemple #1
0
        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();
        }
Exemple #2
0
 void IVimBufferCreationListener.VimBufferCreated(IVimBuffer buffer)
 {
     var textView = buffer.TextView;
     textView.Closed += (x, y) =>
     {
         buffer.Close();
         _bufferMap.Remove(buffer);
     };
 }
Exemple #3
0
        void IVimBufferCreationListener.VimBufferCreated(IVimBuffer buffer)
        {
            var textView = buffer.TextView;

            textView.Closed += (x, y) =>
            {
                buffer.Close();
                _filterMap.Remove(buffer);
            };
        }
Exemple #4
0
        void IVimBufferCreationListener.VimBufferCreated(IVimBuffer vimBuffer)
        {
            var textView = vimBuffer.TextView;

            textView.Closed += (x, y) =>
            {
                vimBuffer.Close();
                _toSyncSet.Remove(vimBuffer);
                _vimBufferToCommandTargetMap.Remove(vimBuffer);
            };
        }
Exemple #5
0
        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);
        }
Exemple #6
0
 void IVimBufferCreationListener.VimBufferCreated(IVimBuffer vimBuffer)
 {
     var textView = vimBuffer.TextView;
     textView.Closed += (x, y) =>
     {
         vimBuffer.Close();
         _toSyncSet.Remove(vimBuffer);
         _vimBufferToCommandTargetMap.Remove(vimBuffer);
     };
 }
 public void TearDown()
 {
     Dispatcher.CurrentDispatcher.DoEvents();
     _buffer.Close();
 }
Exemple #8
0
 public void TearDown()
 {
     _buffer.Close();
 }