iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.82k stars 284 forks source link

MarkdownPreviewToggle command doesn't respect mkdp_auto_start #486

Open ArchWand opened 2 years ago

ArchWand commented 2 years ago

Describe the bug With let g:mkdp_auto_start=1, running :MarkdownPreviewToggle opens a second tab instead of closing the first. Note: this appears to be similar to #237

To Reproduce Steps to reproduce the behavior:

  1. Put let g:mkdp_auto_start=1 into ~/.config/nvim/init.vim. Save and quit.
  2. Open a markdown file. A preview will open.
  3. Run :MarkdownPreviewToggle. Another preview will open, despite one already existing.

Expected behavior The toggle command should respect the auto-start variable, and not open a duplicate tab.

Screenshots Screenshot of duplicated firefox tabs

Desktop (please complete the following information):

ArchWand commented 2 years ago

My current workaround: disable autostart :\