mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
Revert "Work around issue using buffer number rather than name"
This reverts commit d6540b2588, which
caused all sorts of breakages with buffer names with brackets in them.
This was greatly exacerbated by airline.vim setting an erroneous
b:git_dir in plugin buffers based on the current working directory.
Closes #464. Closes #463. Closes #461.
This commit is contained in:
@@ -460,15 +460,15 @@ function! fugitive#buffer(...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_getvar(var) dict abort
|
function! s:buffer_getvar(var) dict abort
|
||||||
return getbufvar(bufname(self['#']), a:var)
|
return getbufvar(self['#'],a:var)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_setvar(var,value) dict abort
|
function! s:buffer_setvar(var,value) dict abort
|
||||||
return setbufvar(bufname(self['#']), a:var, a:value)
|
return setbufvar(self['#'],a:var,a:value)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_getline(lnum) dict abort
|
function! s:buffer_getline(lnum) dict abort
|
||||||
return get(getbufline(bufname(self['#']), a:lnum), 0, '')
|
return get(getbufline(self['#'], a:lnum), 0, '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_repo() dict abort
|
function! s:buffer_repo() dict abort
|
||||||
|
|||||||
Reference in New Issue
Block a user