Skip to content

Commit fd4bdd6

Browse files
NewComer00voldikss
authored andcommitted
fix: support Vim 8.0 without default argument values
1 parent b18b41d commit fd4bdd6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoload/floaterm/path.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,10 @@ function! s:path_join(home, name) abort
126126
endif
127127
endfunction
128128

129-
function! floaterm#path#get_root(path=getcwd()) abort
129+
function! floaterm#path#get_root(...) abort
130+
let l:path = a:0 > 0 ? a:1 : getcwd()
130131
let strict = 0
131-
let l:hr = s:find_root(a:path, g:floaterm_rootmarkers, strict)
132+
let l:hr = s:find_root(l:path, g:floaterm_rootmarkers, strict)
132133
if s:is_windows
133134
let l:hr = s:string_replace(l:hr, '/', "\\")
134135
endif

0 commit comments

Comments
 (0)