Include leading / in buffer().rev()
Slowly pave the way for relative paths.
This commit is contained in:
parent
b18bb05b91
commit
48daf7ae72
@ -65,7 +65,7 @@ function! s:shellslash(path)
|
||||
endfunction
|
||||
|
||||
function! s:recall()
|
||||
let rev = s:buffer().rev()
|
||||
let rev = s:sub(s:buffer().rev(), '^/', '')
|
||||
if rev ==# ':'
|
||||
return matchstr(getline('.'),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$\|^\d\{6} \x\{40\} \d\t\zs.*')
|
||||
endif
|
||||
@ -497,7 +497,7 @@ function! s:buffer_rev() dict abort
|
||||
elseif self.spec() =~ '\.git/refs/\|\.git/.*HEAD$'
|
||||
return self.spec()[strlen(self.repo().dir())+1 : -1]
|
||||
else
|
||||
return self.path()
|
||||
return self.path('/')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user