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); }
public void RespectHostCreationPolicy() { VimHost.ShouldCreateVimBufferImpl = false; var textView = CreateTextView(); Assert.False(Vim.TryGetVimBuffer(textView, out IVimBuffer vimBuffer)); Assert.Null(vimBuffer); }
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)); }