iamcco / iamcco/markdown-preview.nvim

MarkdownPreviewToggle command doesn't respect mkdp_auto_start

Open
#486 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

**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](https://cdn.discordapp.com/attachments/787460496138698812/997513360998408376/unknown.png)

**Desktop (please complete the following information):**
- OS: Ubuntu 22.04

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.