File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff 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
214215enddef
215216
@@ -293,8 +294,9 @@ enddef
293294
294295def 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' )
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ import autoload './../lib/utils.vim'
88import 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
1515endif
1616
You can’t perform that action at this time.
0 commit comments