Add fix for old Vims where getpos does not return list of integers

This commit is contained in:
ZyX 2014-08-05 23:03:59 +04:00
parent 117661e186
commit f4b5c6a63f
1 changed files with 2 additions and 2 deletions

View File

@ -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
========= =============================================================
'''
sline, scol, soff = vim_funcs['getpos']("v")[1:]
eline, ecol, eoff = vim_funcs['getpos'](".")[1:]
sline, scol, soff = [int(v) for v in vim_funcs['getpos']("v")[1:]]
eline, ecol, eoff = [int(v) for v in vim_funcs['getpos'](".")[1:]]
svcol = vim_funcs['virtcol']([sline, scol, soff])
evcol = vim_funcs['virtcol']([eline, ecol, eoff])
rows = abs(eline - sline) + 1