Do not use vim_funcs['bufnr'] for modified_buffers segment
This commit is contained in:
parent
e7d0c8368e
commit
80db7df959
|
@ -470,10 +470,13 @@ def modified_buffers(pl, text='+ ', join_str=','):
|
||||||
:param str join_str:
|
:param str join_str:
|
||||||
string to use for joining the modified buffer list
|
string to use for joining the modified buffer list
|
||||||
'''
|
'''
|
||||||
buffer_len = vim_funcs['bufnr']('$')
|
buffer_mod_text = join_str.join((
|
||||||
buffer_mod = [str(bufnr) for bufnr in range(1, buffer_len + 1) if int(getbufvar(bufnr, '&modified') or 0)]
|
str(buffer.number)
|
||||||
if buffer_mod:
|
for buffer in vim.buffers
|
||||||
return text + join_str.join(buffer_mod)
|
if int(vim_getbufoption({'buffer': buffer, 'bufnr': buffer.number}, 'modified'))
|
||||||
|
))
|
||||||
|
if buffer_mod_text:
|
||||||
|
return text + buffer_mod_text
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue