mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 15:54:30 +02:00
commit
77322aeaf2
@ -27,10 +27,6 @@ matrix:
|
|||||||
- python: "3.5"
|
- python: "3.5"
|
||||||
- python: "pypy"
|
- python: "pypy"
|
||||||
- python: "pypy3"
|
- python: "pypy3"
|
||||||
- python: "2.6"
|
|
||||||
env: >-
|
|
||||||
USE_UCS2_PYTHON=1
|
|
||||||
UCS2_PYTHON_VARIANT="2.6"
|
|
||||||
- python: "2.7"
|
- python: "2.7"
|
||||||
env: >-
|
env: >-
|
||||||
USE_UCS2_PYTHON=1
|
USE_UCS2_PYTHON=1
|
||||||
|
@ -273,7 +273,7 @@ def _vim_to_python(value):
|
|||||||
|
|
||||||
if hasattr(vim, 'options'):
|
if hasattr(vim, 'options'):
|
||||||
def vim_getbufoption(info, option):
|
def vim_getbufoption(info, option):
|
||||||
return info['buffer'].options[str(option)]
|
return _vim_to_python(info['buffer'].options[str(option)])
|
||||||
|
|
||||||
def vim_getoption(option):
|
def vim_getoption(option):
|
||||||
return vim.options[str(option)]
|
return vim.options[str(option)]
|
||||||
|
@ -7,7 +7,7 @@ from powerline.bindings.vim import vim_getbufoption, buffer_name
|
|||||||
|
|
||||||
|
|
||||||
def help(matcher_info):
|
def help(matcher_info):
|
||||||
return str(vim_getbufoption(matcher_info, 'buftype')) == 'help'
|
return vim_getbufoption(matcher_info, 'buftype') == 'help'
|
||||||
|
|
||||||
|
|
||||||
def cmdwin(matcher_info):
|
def cmdwin(matcher_info):
|
||||||
@ -16,4 +16,4 @@ def cmdwin(matcher_info):
|
|||||||
|
|
||||||
|
|
||||||
def quickfix(matcher_info):
|
def quickfix(matcher_info):
|
||||||
return str(vim_getbufoption(matcher_info, 'buftype')) == 'quickfix'
|
return vim_getbufoption(matcher_info, 'buftype') == 'quickfix'
|
||||||
|
@ -3,9 +3,12 @@ from __future__ import (unicode_literals, division, absolute_import, print_funct
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from powerline.bindings.vim import buffer_name
|
from powerline.bindings.vim import vim_getbufoption, buffer_name
|
||||||
|
|
||||||
|
|
||||||
def commandt(matcher_info):
|
def commandt(matcher_info):
|
||||||
name = buffer_name(matcher_info)
|
name = buffer_name(matcher_info)
|
||||||
return name and os.path.basename(name) == b'GoToFile'
|
return (
|
||||||
|
vim_getbufoption(matcher_info, 'filetype') == 'command-t'
|
||||||
|
or (name and os.path.basename(name) == b'GoToFile')
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user