mirror of
https://github.com/powerline/powerline.git
synced 2025-07-19 20:04:56 +02:00
Add support for getbufvar('%') and &textwidth option to vim emulation
This commit is contained in:
parent
1ffa8a471a
commit
cce79fda0e
@ -196,6 +196,8 @@ def _emul_mode(*args):
|
||||
@_str_func
|
||||
def _emul_getbufvar(bufnr, varname):
|
||||
if varname[0] == '&':
|
||||
if bufnr == '%':
|
||||
bufnr = buffers[_buffer()].number
|
||||
if bufnr not in buffers:
|
||||
return ''
|
||||
try:
|
||||
@ -322,6 +324,7 @@ class _Buffer(object):
|
||||
'filetype': '',
|
||||
'buftype': '',
|
||||
'fileencoding': 'utf-8',
|
||||
'textwidth': 80,
|
||||
}
|
||||
_buf_lines[bufnr] = ['']
|
||||
from copy import copy
|
||||
|
Loading…
x
Reference in New Issue
Block a user