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

bug: [Terminal] Clicking on buffer tab while termial is open and in focus opens buffer in terminal #110

Closed
4 tasks done
terr-steak opened this issue Nov 19, 2024 · 0 comments · Fixed by #103
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@terr-steak
Copy link

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.2

Operating system/version

MacOS 15.0.1

Describe the bug

If you have the terminal open <C-/> and it has focus, and you then click on a buffer tab, the buffer that is clicked opens in the terminal pane and you have to do :q to close it, doing <leader-bd> deletes the current buffer ignoring the one open in the terminal despite the buffer in the terminal having focus.

Steps To Reproduce

  1. Have multiple files open so that you have tabs for your open buffers
  2. Toggle terminal <C-/> to open (for me this automatically gives it focus)
  3. Click on one of your open buffer tabs (not just the buffer but the actual tab where the filename is at the top of the window)

Expected Behavior

Focus would return to the buffer, terminal would either toggle closed or do nothing.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
	spec = {
		{ "folke/snacks.nvim", opts = {} },
		-- add any other plugins here
		{ import = "lazyvim.plugins.extras.coding.blink" },
		{ import = "lazyvim.plugins.extras.coding.mini-comment" },
		{ import = "lazyvim.plugins.extras.coding.mini-surround" },
		{ import = "lazyvim.plugins.extras.editor.mini-diff" },
		{ import = "lazyvim.plugins.extras.editor.refactoring" },
		{ import = "lazyvim.plugins.extras.formatting.prettier" },
		{ import = "lazyvim.plugins.extras.lang.angular" },
		{ import = "lazyvim.plugins.extras.lang.docker" },
		{ import = "lazyvim.plugins.extras.lang.git" },
		{ import = "lazyvim.plugins.extras.lang.java" },
		{ import = "lazyvim.plugins.extras.lang.json" },
		{ import = "lazyvim.plugins.extras.lang.kotlin" },
		{ import = "lazyvim.plugins.extras.lang.markdown" },
		{ import = "lazyvim.plugins.extras.lang.python" },
		{ import = "lazyvim.plugins.extras.lang.sql" },
		{ import = "lazyvim.plugins.extras.lang.toml" },
		{ import = "lazyvim.plugins.extras.lang.yaml" },
		{ import = "lazyvim.plugins.extras.linting.eslint" },
		{ import = "lazyvim.plugins.extras.ui.mini-animate" },
		{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
		{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
		{ import = "lazyvim.plugins.extras.util.dot" },
		{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
		{ import = "lazyvim.plugins.extras.util.rest" },
	},
})
@terr-steak terr-steak added the bug Something isn't working label Nov 19, 2024
@folke folke closed this as completed in 9c0d2e2 Nov 19, 2024
folke pushed a commit that referenced this issue Nov 19, 2024
🤖 I have created a release *beep* *boop*
---


## [2.4.0](v2.3.0...v2.4.0)
(2024-11-19)


### Features

* **dashboard:** hide tabline and statusline when loading during startup
([75dc74c](75dc74c))
* **dashboard:** when an item is wider than pane width and only one
pane, then center it. See
[#108](https://github.com/folke/snacks.nvim/issues/108)
([c15953e](c15953e))
* **gitbrowse:** open also visual selection range
([#89](#89))
([c29c0d4](c29c0d4))
* **win:** detect alien buffers opening in managed windows and open them
somewhere else. Fixes
[#110](#110)
([9c0d2e2](9c0d2e2))


### Bug Fixes

* **dashboard:** always hide cursor
([68fcc25](68fcc25))
* **dashboard:** check session managers in order
([1acea8b](1acea8b))
* **dashboard:** fix race condition when sending data while closing
([4188446](4188446))
* **dashboard:** minimum one pane even when it doesn't fit the screen.
Fixes [#104](#104)
([be8feef](be8feef))
* **dashboard:** only check for piped stdin when in TUI. Ignore GUIs
([3311d75](3311d75))
* **dashboard:** remove weird preset.keys function override. Just copy
defaults if you want to change them
([0b9e09c](0b9e09c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant