I don't think you want to destroy the pane here, there may be other items open in it that should still stay open even if the preview is being closed.

I think instead you want to do:

```coffee
previewPane.destroyItem(previewPane.itemForUri(uri))
```

This will only destroy the markdown preview item in the pane, leaving other item as-is.