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: avoid custom autocmd conflicts with the help popup buffer #455

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

mikavilpas
Copy link
Owner

Issue

If the user has set up custom autocmds that trigger for help buffers, the yazi.nvim help popup buffer will be affected by them. I noticed this after setting the following autocmd:

vim.api.nvim_create_autocmd("FileType", {
  -- always open help buffers in a vertical split
  pattern = { "help", "man" },
  command = "wincmd L",
})

Solution

Only use the syntax option to set the filetype of the help buffer to help. This way, the user's custom autocmds will not affect the help popup buffer.

Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 16.0.0 to 17.0.0.
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@v16.0.0...v17.0.0)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [nvim-neorocks/nvim-busted-action](https://github.com/nvim-neorocks/nvim-busted-action) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/nvim-neorocks/nvim-busted-action/releases)
- [Changelog](https://github.com/nvim-neorocks/nvim-busted-action/blob/main/CHANGELOG.md)
- [Commits](nvim-neorocks/nvim-busted-action@v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: nvim-neorocks/nvim-busted-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…h 3 updates

Bumps the npm-dependencies group with 3 updates in the / directory: [wait-on](https://github.com/jeffbski/wait-on), [express](https://github.com/expressjs/express) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm-dependencies group with 3 updates in the /integration-tests directory: [wait-on](https://github.com/jeffbski/wait-on), [express](https://github.com/expressjs/express) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `wait-on` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/jeffbski/wait-on/releases)
- [Commits](jeffbski/wait-on@v8.0.0...v8.0.1)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

Updates `vite` from 5.4.3 to 5.4.4
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.4/packages/vite)

Updates `wait-on` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/jeffbski/wait-on/releases)
- [Commits](jeffbski/wait-on@v8.0.0...v8.0.1)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

Updates `vite` from 5.4.3 to 5.4.4
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.4/packages/vite)

---
updated-dependencies:
- dependency-name: wait-on
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: express
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: wait-on
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: express
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
@mikavilpas mikavilpas force-pushed the avoid-autocmd-conflicts-with-help-buffer branch from 5281c33 to e0239ad Compare September 12, 2024 07:22
@mikavilpas mikavilpas enabled auto-merge (squash) September 12, 2024 07:23
Issue
=====

If the user has set up custom autocmds that trigger for `help` buffers,
the yazi.nvim help popup buffer will be affected by them. I noticed this
after setting the following autocmd:

```lua
vim.api.nvim_create_autocmd("FileType", {
  -- always open help buffers in a vertical split
  pattern = { "help", "man" },
  command = "wincmd L",
})
```

Solution
========

Only use the `syntax` option to set the filetype of the help buffer to
`help`. This way, the user's custom autocmds will not affect the help
popup buffer.
@mikavilpas mikavilpas force-pushed the avoid-autocmd-conflicts-with-help-buffer branch from e0239ad to c0716a0 Compare September 12, 2024 07:38
@mikavilpas mikavilpas merged commit ac97d7c into main Sep 12, 2024
14 checks passed
@mikavilpas mikavilpas deleted the avoid-autocmd-conflicts-with-help-buffer branch September 12, 2024 07:41
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.

1 participant