VimBuffer: use vim.current.buffer.number instead of vim.eval
This should be more performant.
This commit is contained in:
parent
c3a0924b77
commit
8c257e24e0
@ -49,8 +49,8 @@ class VimBuffer(object):
|
||||
|
||||
@property
|
||||
def number(self): # pylint:disable=no-self-use
|
||||
"""The bufnr() of this buffer."""
|
||||
return int(eval("bufnr('%')"))
|
||||
"""The bufnr() of the current buffer."""
|
||||
return vim.current.buffer.number
|
||||
|
||||
@property
|
||||
def cursor(self): # pylint:disable=no-self-use
|
||||
|
Loading…
Reference in New Issue
Block a user