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
|
endfunction
|
||||||
|
|
||||||
function! s:recall()
|
function! s:recall()
|
||||||
let rev = s:buffer().rev()
|
let rev = s:sub(s:buffer().rev(), '^/', '')
|
||||||
if rev ==# ':'
|
if rev ==# ':'
|
||||||
return matchstr(getline('.'),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$\|^\d\{6} \x\{40\} \d\t\zs.*')
|
return matchstr(getline('.'),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$\|^\d\{6} \x\{40\} \d\t\zs.*')
|
||||||
endif
|
endif
|
||||||
@ -497,7 +497,7 @@ function! s:buffer_rev() dict abort
|
|||||||
elseif self.spec() =~ '\.git/refs/\|\.git/.*HEAD$'
|
elseif self.spec() =~ '\.git/refs/\|\.git/.*HEAD$'
|
||||||
return self.spec()[strlen(self.repo().dir())+1 : -1]
|
return self.spec()[strlen(self.repo().dir())+1 : -1]
|
||||||
else
|
else
|
||||||
return self.path()
|
return self.path('/')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user