示例#1
0
            public void CreateVimBuffer1()
            {
                var view      = CreateTextView("foo bar");
                var vimBuffer = Vim.CreateVimBuffer(view);

                Assert.True(Vim.TryGetVimBuffer(view, out IVimBuffer found));
                Assert.Same(view, found.TextView);
            }
示例#2
0
        public void RespectHostCreationPolicy()
        {
            VimHost.ShouldCreateVimBufferImpl = false;
            var textView = CreateTextView();

            Assert.False(Vim.TryGetVimBuffer(textView, out IVimBuffer vimBuffer));
            Assert.Null(vimBuffer);
        }
示例#3
0
            public void RemoveBuffer2()
            {
                var view      = CreateTextView("foo bar");
                var vimBuffer = Vim.CreateVimBuffer(view);

                Assert.True(Vim.RemoveVimBuffer(view));

                Assert.False(Vim.TryGetVimBuffer(view, out vimBuffer));
            }