From 01d0e7474fb0f07d893dea0947f00977c545f905 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 19 May 2017 14:23:11 +0530 Subject: [PATCH] Change reported version to >= 4000 so that vim autodetects SGR mouse support correctly --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 21b548959..cbbbd5f3a 100755 --- a/setup.py +++ b/setup.py @@ -131,7 +131,9 @@ def init_env(debug=False, sanitize=False, native_optimizations=True): ldflags += shlex.split(os.environ.get('LDFLAGS', '')) cflags.append('-pthread') - cflags.append('-DPRIMARY_VERSION={}'.format(version[0])) + # We add 4000 to the primary version because vim turns on SGR mouse mode + # automatically if this version is high enough + cflags.append('-DPRIMARY_VERSION={}'.format(version[0] + 4000)) cflags.append('-DSECONDARY_VERSION={}'.format(version[1])) if not is_travis and not isosx and subprocess.Popen( [PKGCONFIG, 'glew', '--atleast-version=2']