Skip to content

Commit e9977eb

Browse files
committed
Pass the absolute path to the .pde file to compile to arduino-vim.
This works for sketches not stored in the primary sketchbook directory.
1 parent 2c4d6b6 commit e9977eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vim-arduino.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ endfunction
6666

6767
" Private: Check to see if a file can be compiled by the Aruino IDE
6868
"
69-
" Returns the filename of the current buffer if it is a *.pde file. Otherwise
69+
" Returns the absolute path of the current buffer if it is a *.pde file. Otherwise
7070
" empty string.
7171
function! s:CheckFile()
7272
let l:f_name = bufname("%")
7373
if l:f_name =~ '.pde$'
74-
return l:f_name
74+
return expand("%:p")
7575
else
7676
echo "Only *.pde files can be compilied. File" l:f_name "does not have a recognized extention."
7777
return ""

0 commit comments

Comments
 (0)