Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Fix for togglePreviewToSide (#780)
Changes togglePreviewToSide to closePreviewToSide. Opening preview to side is handled by VScode. As long as they have the same key binding, it will behave like toggle. Cheking for `window.activeTextEditor` is not working becase acording to API documentation it returns: > "The currently active editor or undefined. The active editor is the one that currently has focus or, when none has focus, the one that has changed input most recently." Since "one that has changed input most recently" will always be text editor in the current window, when preview opened to the side, `activeTextEditor` will almost never be undefined. When markdown preview has focus it sets the context `markdownPreviewFocus`. Since there no way of getting contexts from the extension code like described here microsoft/vscode#46445 (comment) I think it's better to change toggle to close and check for `markdownPreviewFocus` from key bindings.
- Loading branch information