mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-10 23:29:19 +08:00
Work around issue using buffer number rather than name
Observed on the OS X Mavericks install of Vim 7.3.
This commit is contained in:
1 parent
22cc877e64
commit
d6540b2588
1 file changed
+3
-3
+3
-3
@@ -458,15 +458,15 @@ function! fugitive#buffer(...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_getvar(var) dict abort
|
function! s:buffer_getvar(var) dict abort
|
||||||
return getbufvar(self['#'],a:var)
|
return getbufvar(bufname(self['#']), a:var)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_setvar(var,value) dict abort
|
function! s:buffer_setvar(var,value) dict abort
|
||||||
return setbufvar(self['#'],a:var,a:value)
|
return setbufvar(bufname(self['#']), a:var, a:value)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:buffer_getline(lnum) dict abort
|
function! s:buffer_getline(lnum) dict abort
|
||||||
return getbufline(self['#'],a:lnum)[0]
|
return getbufline(bufname(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