Skip to content

Commit 1bdad5a

Browse files
committed
Forced to vim 9.1.1270
1 parent 2c31f06 commit 1bdad5a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/links.vim

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,14 @@ export def OpenLink()
203203
b:markdown_extras_links = RefreshLinksDict()
204204
const link_id = utils.GetTextObject('i[').text
205205
const link = b:markdown_extras_links[link_id]
206+
# TODO: filereadable() if not good if for example you have a .png it is
207+
# still readable
206208
if filereadable(link)
207209
exe $'edit {link}'
208-
elseif exists(':Open') != 0
209-
echom link
210-
exe $":Open {link}"
210+
elseif IsURL(link)
211+
exe $":URLOpen {link}"
211212
else
212-
utils.Echowarn('You need a Vim version that has the :Open command')
213+
exe $":Open {link}"
213214
endif
214215
enddef
215216

@@ -293,8 +294,9 @@ enddef
293294

294295
def ClosePopups()
295296
# This function tear down everything
296-
popup_close(main_id, -1)
297-
popup_close(prompt_id, -1)
297+
# popup_close(main_id, -1)
298+
# popup_close(prompt_id, -1)
299+
# TODO: this will clear any opened popup
298300
popup_clear()
299301
# RestoreCursor()
300302
prop_type_delete('PopupToolsMatched')

plugin/markdown_extras.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import autoload './../lib/utils.vim'
88
import autoload './../lib/funcs.vim'
99

1010

11-
if !has('vim9script') || v:version < 900
11+
if !has("patch-9.1.1270")
1212
# Needs Vim version 9.0 and above
13-
echo "You need at least Vim 9.0"
13+
echoerr "[markdown-extras] You need at least Vim 9.1.1270"
1414
finish
1515
endif
1616

0 commit comments

Comments
 (0)