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

feature request: add sidebar binding to Stop a task #357

Open
1 task done
petobens opened this issue Sep 22, 2024 · 3 comments
Open
1 task done

feature request: add sidebar binding to Stop a task #357

petobens opened this issue Sep 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@petobens
Copy link

petobens commented Sep 22, 2024

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

AFAICT there is a Dispose task that stops and delete a task. Is it possible to add Stop binding to the sidebar to only stop/cancel but not delete the task?

Provide background

No response

What is the significance of this feature?

nice to have

Additional details

No response

@petobens petobens added the enhancement New feature or request label Sep 22, 2024
@RomaLzhih
Copy link

I think it is a good suggestion, it is annoying that we have to dispose a task in order to stop it then re-enter all parameters again.

@stevearc
Copy link
Owner

I'm confused by this request, because there is an action for stopping a running task

stop = {
condition = function(task)
return task.status == STATUS.RUNNING
end,
run = function(task)
task:stop()
end,
},

It only appears while the task is running, though. So if you select a task that has already completed it will not appear. Perhaps that's why you don't see it?

@stevearc stevearc added the question Further information is requested label Jan 16, 2025
@petobens
Copy link
Author

Hi @stevearc and thanks for your reply. Maybe then the request is much simpler: I want to add the stop action to the task_list = { bindings = ...}}. I see for instance a Dispose binding defined here:

{
desc = "Dispose task",
plug = "<Plug>OverseerTask:Dispose",
rhs = function(sidebar)
sidebar:run_action("dispose")
end,
},
which I can then remap as:

task_list = {
    bindings = {
        ['dd'] = 'Dispose',
},

Is it possible to do the same thing for the stop task?

@github-actions github-actions bot removed the question Further information is requested label Jan 16, 2025
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

3 participants