diff options
Diffstat (limited to 'rplugin/python3/deoplete/util.py')
-rw-r--r-- | rplugin/python3/deoplete/util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rplugin/python3/deoplete/util.py b/rplugin/python3/deoplete/util.py index 760ad3f..ab12a9c 100644 --- a/rplugin/python3/deoplete/util.py +++ b/rplugin/python3/deoplete/util.py @@ -211,3 +211,15 @@ def charwidth(c): def expand(path): return os.path.expandvars(os.path.expanduser(path)) + + +def getlines(vim, start=1, end='$'): + if end == '$': + end = len(vim.current.buffer) + max = 5000 + lines = [] + current = start + while current <= end: + lines += vim.call('getline', current, current + max) + current += max + 1 + return lines |