Resolve close buffer bug

resolve https://github.com/frankhale/editor/issues/10