Fix markdown go blank issue

@samccone, I made some change on top of your change that seems to have address the scope/editor mismatching causing editor go blank or wrong focus issue. I am still seeing the whitespace growing though. Please review and see if it makes sense to merge into your branch.
you are right, this is not in the link, so this will cause issues.

silly me