Bug fixes

This commit is contained in:
Max Bucknell 2025-01-16 14:51:07 +00:00
parent 8d3ded9659
commit 8f1f3cda87
No known key found for this signature in database
3 changed files with 3 additions and 5 deletions

View file

@ -2,7 +2,7 @@ function! asyncomplete#sources#mbnotes#get_source_options(opts)
let l:defaults = { let l:defaults = {
\ 'name': 'mbnotes', \ 'name': 'mbnotes',
\ 'completor': function('asyncomplete#sources#mbnotes#completor'), \ 'completor': function('asyncomplete#sources#mbnotes#completor'),
\ 'allowlist': ['mbnotes.qmd'] \ 'allowlist': ['mbnotes.quarto']
\ } \ }
return extend(l:defaults, a:opts) return extend(l:defaults, a:opts)
@ -48,8 +48,6 @@ function! asyncomplete#sources#mbnotes#completor(opt, ctx)
let l:link_pattern = '\]([^)]*$' let l:link_pattern = '\]([^)]*$'
let l:link = matchstr(a:ctx['typed'], l:link_pattern) let l:link = matchstr(a:ctx['typed'], l:link_pattern)
echom l:link .. " | " .. a:ctx['typed']
if l:link !=# '' if l:link !=# ''
if localtime() > s:notes_ttl if localtime() > s:notes_ttl
call asyncomplete#sources#mbnotes#refresh_cache() call asyncomplete#sources#mbnotes#refresh_cache()

View file

@ -40,7 +40,7 @@ export def RenderNote(format: string, buffer = "%")
endif endif
else else
if exists("g:mbnotes_open_command") && g:mbnotes_open_command != "" if exists("g:mbnotes_open_command") && g:mbnotes_open_command != ""
execute "!" .. g:mbnotes_open_command .. " " .. output execute "!" .. g:mbnotes_open_command .. " " .. shellescape(output)
endif endif
if g:mbnotes_renderer_close_on_end if g:mbnotes_renderer_close_on_end

View file

@ -4,7 +4,7 @@ def IsMBNotes()
var path_prefix = expand('%:p')[0 : len(g:mbnotes_dir) - 1] var path_prefix = expand('%:p')[0 : len(g:mbnotes_dir) - 1]
if path_prefix == g:mbnotes_dir if path_prefix == g:mbnotes_dir
set filetype=mbnotes.qmd set filetype=mbnotes.quarto
endif endif
enddef enddef