SidOfc / mkdx

A vim plugin that adds some nice extra's for working with markdown documents
https://www.vim.org/scripts/script.php?script_id=5620
MIT License
482 stars 13 forks source link

`gf` bug #122

Closed Delayless closed 4 years ago

Delayless commented 4 years ago
[Youtebe](https://youtube.com/)
[Google](https://google.com/)

I press gf on "google" and nvim will open Youtube. Unless I insert a blank line between the two links.

The same:

![picture](./Pictures/Screenshot.png)
[Youtube](https://youtube.com/)
[Google](https://google.com/)

I press gf or gx on anywhere(picture, youtube, google), then always open the picture.

SidOfc commented 4 years ago

Hello @Delayless, thanks for opening an issue!

I can indeed confirm this is a bug, it happens because I'm using the highlighting group to determine on which link you are, so multiple consecutive links are not distinguishable because they all have the same highlight group. I can't fix it right now but will look into it as soon as possible.

Until that time I don't think there is a "clean" fix, aside from disabling g:mkdx#settings.gf_on_steriods for now and sticking with the Vim default gx mapping if you use NetRW.

Cheers for reporting :+1:

SidOfc commented 4 years ago

Hi @Delayless,

I've fixed the issue by limiting gx/gf to the line the cursor is on, let me know if this issue still occurs on your side after you've updated mkdx.

Cheers for the find :+1: