yi-editor/yi — pull request #448 by benarmston (2013-07-27 21:59:31+00:00)
Title: Add :bdelete ex command

This PR adds the `:bdelete` command, also aliased as `:bdel` and `:bd`.

The existing tests for the vim2 keybindings seem to deal with `BufferM` actions, whilst this is an `EditorM` action. Is there a mechanism for testing `EditorM` actions? Or am I perhaps missing something obvious?

Also included in this PR is a fix for closing the active window when there is only one tab and only one window. Again, I'm not sure how to add a test for this.

I believe that this also exposes another bug, which can be observed by doing the following:

```
yi --as vim2
:e myfile.txt
:bdelete
:e myfile.txt
```

An error is raised about no buffer having that key. I'm confident that this hasn't been introduced by this change, though it may be worthwhile double checking before accepting this PR.