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

Allow parsing contest #21

Open
qixiao986 opened this issue Apr 2, 2022 · 5 comments
Open

Allow parsing contest #21

qixiao986 opened this issue Apr 2, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@qixiao986
Copy link

When I start neovim, CphReceive one problem is ok, but if I CphReceive another problem, it does nothing, I have to restart the neovim and it receive again. looks like it can only receive one problem in one session.
I check the source code, find here:

M.server:shutdown()

looks like the server didn't close like the client, so I add this:
M.server:close()
and it worked properly.
please check if this is a bug.

@qixiao986
Copy link
Author

or we can move this line out of the function and don't close, that will receive multi problem without retype CphReceive, that's very handy.

M.server = uv.new_tcp()

@p00f
Copy link
Owner

p00f commented Apr 2, 2022

or we can move this line out of the function and don't close, that will receive multi problem without retype CphReceive, that's very handy.

Keeping the server on would be a waste of resources right?

@qixiao986
Copy link
Author

or we can move this line out of the function and don't close, that will receive multi problem without retype CphReceive, that's very handy.

Keeping the server on would be a waste of resources right?

yeah, but to me it's very convenient and more suits my needs.

@p00f
Copy link
Owner

p00f commented Apr 2, 2022

It takes like 1 second to :CphReceive again (write :Cp and tab through), so I won't change this. I added M.server:close() and fixed the issue, thanks!

@p00f p00f closed this as completed Apr 2, 2022
@qixiao986
Copy link
Author

qixiao986 commented Apr 4, 2022

It takes like 1 second to :CphReceive again (write :Cp and tab through), so I won't change this. I added M.server:close() and fixed the issue, thanks!

I have another reason why we should keep server open, if we want parse contest, that will need us to receive multi problem at once, if the server close it can only receive the first problem. you can try to parse a codeforces contest, like this link:Codeforces Round #779 (Div. 2)

@p00f p00f changed the title can't receive more than one problem Allow parsing contest Apr 4, 2022
@p00f p00f reopened this Apr 4, 2022
@p00f p00f added the enhancement New feature or request label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants