mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 07:16:31 +02:00
Add fix for old Vims where getpos does not return list of integers
This commit is contained in:
parent
117661e186
commit
f4b5c6a63f
@ -134,8 +134,8 @@ def visual_range(pl, segment_info, CTRL_V_text='{rows} × {vcols}', v_text_oneli
|
|||||||
vcols Number of virtual columns in the selection
|
vcols Number of virtual columns in the selection
|
||||||
========= =============================================================
|
========= =============================================================
|
||||||
'''
|
'''
|
||||||
sline, scol, soff = vim_funcs['getpos']("v")[1:]
|
sline, scol, soff = [int(v) for v in vim_funcs['getpos']("v")[1:]]
|
||||||
eline, ecol, eoff = vim_funcs['getpos'](".")[1:]
|
eline, ecol, eoff = [int(v) for v in vim_funcs['getpos'](".")[1:]]
|
||||||
svcol = vim_funcs['virtcol']([sline, scol, soff])
|
svcol = vim_funcs['virtcol']([sline, scol, soff])
|
||||||
evcol = vim_funcs['virtcol']([eline, ecol, eoff])
|
evcol = vim_funcs['virtcol']([eline, ecol, eoff])
|
||||||
rows = abs(eline - sline) + 1
|
rows = abs(eline - sline) + 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user