Sleep 0 support

Open
#21,965 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 13 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
57/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
vim
Domain
tooling

Research direction

Start by reading the implementation and tests for Vim's :sleep command, then compare how timers handle a zero duration. Add support for :sleep 0 and cover it with a focused test; done when zero is accepted without freezing Vim and the existing sleep behavior remains intact.

Written by the indexing model from the issue text.

Description

enhancement

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.

Currently :sleep don't support 0. To avoid some using of timer_start(1)

Describe alternatives you've considered

Since timer can be set 0. I think sleep can support this too. Because it can save many code sometimes.

Additional context
I have a plugin that use job's exit_cb to manage exitcode and output. However the out_cb may be called after exit_cb so that data isn't prepared. Since sleep 1m will frozen the screen, so if many job is exit at same time. Vim is freezing.

Dominant language
Vim Script
Stars
41.4k
Forks
6.2k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vim/vim

All issues in vim/vim

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.