mirror of
https://github.com/powerline/powerline.git
synced 2025-07-28 08:14:41 +02:00
Merge branch 'pull-1075' into develop
This commit is contained in:
commit
558b608c94
@ -10,7 +10,21 @@ from powerline.segments.vim import window_cached
|
|||||||
|
|
||||||
|
|
||||||
@window_cached
|
@window_cached
|
||||||
def current_tag(pl):
|
def current_tag(pl, flags='s'):
|
||||||
|
'''Return tag that is near the cursor.
|
||||||
|
|
||||||
|
:param str flags:
|
||||||
|
Specifies additional properties of the displayed tag. Supported values:
|
||||||
|
|
||||||
|
* s - display complete signature
|
||||||
|
* f - display the full hierarchy of the tag
|
||||||
|
* p - display the raw prototype
|
||||||
|
|
||||||
|
More info in the `official documentation`_ (search for
|
||||||
|
“tagbar#currenttag”).
|
||||||
|
|
||||||
|
.. _`official documentation`: https://github.com/majutsushi/tagbar/blob/master/doc/tagbar.txt
|
||||||
|
'''
|
||||||
if not int(vim.eval('exists(":Tagbar")')):
|
if not int(vim.eval('exists(":Tagbar")')):
|
||||||
return
|
return None
|
||||||
return vim.eval('tagbar#currenttag("%s", "")')
|
return vim.eval('tagbar#currenttag("%s", "", "{0}")'.format(flags))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user