:bug: Fix exception when closing tab

When tab was closed, sometimes exception "This TextEditor has been
destroyed" is thrown. It happens when @editor is destroyed and we try to
call @editor.markBufferRange method.
Merge pull request #253 from d4rkr00t/fix-texteditor-is-destroyed

:bug: Fix exception when closing tab