VimBuffer: use vim.current.buffer.number instead of vim.eval

This should be more performant.
This commit is contained in:
Daniel Hahler 2015-06-27 18:23:46 +02:00
parent c3a0924b77
commit 8c257e24e0

View File

@ -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