Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file preview and Clap filer in vim8 #566

Merged
merged 1 commit into from
Oct 24, 2020

Conversation

ryo7000
Copy link
Contributor

@ryo7000 ryo7000 commented Oct 24, 2020

When job_start() was first called by vim-clap in vim8, preview and Clap filer were not working.
The reason is that the job id in vim8 starts at 0, but the condition of whether the job exists or not is wrong.

To check the first id of the job in vim8, I ran the following command to verify it.

vim -u NONE -U NONE
echo ch_info(job_getchannel(job_start('ls')))

The above command outputs the following

{'status': 'open', 'id': 0, 'in_io': 'pipe', 'err_mode': 'NL', 'in_status': 'open', 'out_io': 'pipe', 'err_io': 'pipe', 'err_status': 'open', 'out_timeout': 2000, 'out_status': 'open', 'out_mode':
 'NL', 'in_mode': 'NL', 'in_timeout': 2000, 'err_timeout': 2000}

So I changed the conditions for the existence of job in vim8.

@romgrk
Copy link
Collaborator

romgrk commented Oct 24, 2020

LGTM. I've been able to reproduce the issue with vim, and the PR fixes it.

@romgrk romgrk merged commit 107f362 into liuchengxu:master Oct 24, 2020
@ryo7000 ryo7000 deleted the fix-vim8-job-id branch October 24, 2020 08:12
ryo7000 added a commit to ryo7000/dotfiles-vim that referenced this pull request Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants