prettier / prettier/vim-prettier
Bug: Switching pane to terminal pane before Prettier finishes inserts strange characters
Nobody has claimed this yet.
- Dominant language
- Vim Script
- Stars
- 1.8k
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
Do you want to request a feature or report a bug?
bug
What is the current/expected behavior?
Current:
- Save buffer
- Move to :term window while prettier is running in the background
- Vim freezes
- press ctrl+c, "Can't parse buffer" error appears.

- Go back to original pane, there are strange characters on top of the file

Expected:
vim-prettier can still update the old pane if you move to a term pane before it finishes
What version of vim-prettier are you using - (output of :PrettierVersion) ?
1.0.0-alpha
What version of prettier are you using - (output of :PrettierCliVersion) ?
2.0.5^@
What is your prettier executable path - (output of :PrettierCliPath) ?
prettier
Did this work in previous versions of vim-prettier and/or prettier ?
Not sure, I recently switched from tmux to :term. I've been seeing occasionally at work but finally can repro consistently on my rasbperry pi since it's slower and gives me time to switch panes before prettier finishes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in vim-prettier by saving a buffer, switching to a :term pane while Prettier runs, and interrupting it if Vim freezes. Trace the asynchronous formatting path involved in updating the original pane. Done means switching panes does not insert strange characters, freeze Vim, or produce a "Can't parse buffer" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100