Skip to content

Commit f89114d

Browse files
committed
Fix #42: Using API not present in vim 8
1 parent 1a2859f commit f89114d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/arduino/chooser.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function! arduino#chooser#Choose(title, raw_items, callback) abort
1313
endif
1414
endfor
1515

16-
if g:arduino_telescope_enabled
16+
if get(g:, 'arduino_telescope_enabled', 0)
1717
call luaeval("require('arduino.telescope').choose('".a:title."', _A, '".a:callback."')", items)
1818
elseif g:arduino_ctrlp_enabled
1919
let ext_data = get(g:ctrlp_ext_vars, s:ctrlp_idx)
@@ -121,7 +121,7 @@ function! s:mk_fzf_callback(callback)
121121
endfunction
122122

123123
" telescope extension {{{1
124-
if !exists('g:arduino_telescope_enabled')
124+
if !exists('g:arduino_telescope_enabled') && exists('*luaeval')
125125
let g:arduino_telescope_enabled = luaeval("pcall(require, 'telescope')")
126126
endif
127127

0 commit comments

Comments
 (0)