From 440133e0d5d576e46bd5ffa555f6a9c534789b48 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 18 Apr 2017 01:57:19 +0200 Subject: health.vim: Set 'iskeyword' to that of ft=help. --- runtime/autoload/provider/pythonx.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'runtime/autoload/provider/pythonx.vim') diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index 08a0f39b01..2f64c22c71 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -112,15 +112,14 @@ function! s:check_interpreter(prog, major_ver) abort endif if v:shell_error == 2 - return [0, prog_path . ' does not have the neovim module installed. ' - \ . 'See ":help provider-python".'] + return [0, prog_path.' does not have the "neovim" module. :help provider-python'] elseif v:shell_error == 127 " This can happen with pyenv's shims. return [0, prog_path . ' does not exist: ' . prog_ver] elseif v:shell_error return [0, 'Checking ' . prog_path . ' caused an unknown error. ' \ . '(' . v:shell_error . ', output: ' . prog_ver . ')' - \ . ' Please report this at github.com/neovim/neovim.'] + \ . ' Report this at https://github.com/neovim/neovim'] endif return [1, ''] -- cgit From 58d8d91ec16b9f7eb3ea31ecae73c6c374e9b847 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 24 Jul 2017 10:27:22 -0400 Subject: provider: Extra pythonx's stderr handling to common functions --- runtime/autoload/provider/pythonx.vim | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'runtime/autoload/provider/pythonx.vim') diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index 2f64c22c71..7285ed43ea 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -5,17 +5,7 @@ endif let s:loaded_pythonx_provider = 1 -let s:stderr = {} -let s:job_opts = {'rpc': v:true} - -" TODO(bfredl): this logic is common and should be builtin -function! s:job_opts.on_stderr(chan_id, data, event) - let stderr = get(s:stderr, a:chan_id, ['']) - let last = remove(stderr, -1) - let a:data[0] = last.a:data[0] - call extend(stderr, a:data) - let s:stderr[a:chan_id] = stderr -endfunction +let s:job_opts = {'rpc': v:true, 'on_stderr': function('provider#stderr_collector')} function! provider#pythonx#Require(host) abort let ver = (a:host.orig_name ==# 'python') ? 2 : 3 @@ -38,9 +28,11 @@ function! provider#pythonx#Require(host) abort catch echomsg v:throwpoint echomsg v:exception - for row in get(s:stderr, channel_id, []) + for row in provider#get_stderr(channel_id) echomsg row endfor + finally + call provider#clear_stderr(channel_id) endtry throw remote#host#LoadErrorForHost(a:host.orig_name, \ '$NVIM_PYTHON_LOG_FILE') -- cgit From 0de019b6a65c6dd5141b7e002343df3689065ce7 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 25 Nov 2017 10:37:41 +0100 Subject: provider: delete vimL stderr collector, now that it exists builtin --- runtime/autoload/provider/pythonx.vim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'runtime/autoload/provider/pythonx.vim') diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index 7285ed43ea..1c77eabe23 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -5,7 +5,7 @@ endif let s:loaded_pythonx_provider = 1 -let s:job_opts = {'rpc': v:true, 'on_stderr': function('provider#stderr_collector')} +let s:job_opts = {'rpc': v:true, 'stderr_buffered': v:true} function! provider#pythonx#Require(host) abort let ver = (a:host.orig_name ==# 'python') ? 2 : 3 @@ -21,18 +21,17 @@ function! provider#pythonx#Require(host) abort endfor try - let channel_id = jobstart(args, s:job_opts) + let job = copy(s:job_opts) + let channel_id = jobstart(args, job) if rpcrequest(channel_id, 'poll') ==# 'ok' return channel_id endif catch echomsg v:throwpoint echomsg v:exception - for row in provider#get_stderr(channel_id) + for row in job.stderr echomsg row endfor - finally - call provider#clear_stderr(channel_id) endtry throw remote#host#LoadErrorForHost(a:host.orig_name, \ '$NVIM_PYTHON_LOG_FILE') -- cgit From df019cebd59a456d6f7dc5948703fdd2059c4b04 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Mon, 27 Nov 2017 11:06:43 +0100 Subject: Revert "provider: delete vimL stderr collector, now that it exists builtin" This change exposed a memory issue with buffered channels, possibly involving GC. Revert until it has been fixed. This reverts commit 0de019b6a65c6dd5141b7e002343df3689065ce7. --- runtime/autoload/provider/pythonx.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/autoload/provider/pythonx.vim') diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index 1c77eabe23..7285ed43ea 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -5,7 +5,7 @@ endif let s:loaded_pythonx_provider = 1 -let s:job_opts = {'rpc': v:true, 'stderr_buffered': v:true} +let s:job_opts = {'rpc': v:true, 'on_stderr': function('provider#stderr_collector')} function! provider#pythonx#Require(host) abort let ver = (a:host.orig_name ==# 'python') ? 2 : 3 @@ -21,17 +21,18 @@ function! provider#pythonx#Require(host) abort endfor try - let job = copy(s:job_opts) - let channel_id = jobstart(args, job) + let channel_id = jobstart(args, s:job_opts) if rpcrequest(channel_id, 'poll') ==# 'ok' return channel_id endif catch echomsg v:throwpoint echomsg v:exception - for row in job.stderr + for row in provider#get_stderr(channel_id) echomsg row endfor + finally + call provider#clear_stderr(channel_id) endtry throw remote#host#LoadErrorForHost(a:host.orig_name, \ '$NVIM_PYTHON_LOG_FILE') -- cgit