Skip to content

Commit

Permalink
Avoid circular dependency in nerdfont#find
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Nov 8, 2024
1 parent fb88e14 commit 0b21e3f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions autoload/nerdfont.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ function! nerdfont#find(...) abort
return glyph
endif

return g:nerdfont#default
return exists('g:nerdfont#default')
\ ? g:nerdfont#default
\ : nerdfont#path#extension#defaults['.']
endfunction

function! s:autofix(result) abort
Expand All @@ -51,7 +53,3 @@ function! s:autofix(result) abort
endtry
endif
endfunction

let g:nerdfont#default = get(g:, 'nerdfont#default',
\ g:nerdfont#path#extension#defaults['.'])

0 comments on commit 0b21e3f

Please sign in to comment.