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(picker): enforce bottom positioning for quickfix and location lists #845

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

Isrothy
Copy link
Contributor

@Isrothy Isrothy commented Feb 1, 2025

Description

This PR addresses an issue where the quickfix list (qflist) would open on the left side of the screen when using vertical splits. By replacing the default :copen command with :botright copen, this update ensures that the qflist consistently opens at the bottom, regardless of the current window layout.

Reproduce:

  1. Open Neovim: Start Neovim normally.
  2. Create a Vertical Split
  3. Use picker to pick anything
  4. Press to send them to quickfix list
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

vim.g.mapleader = " "

require("lazy.minit").repro({
	spec = {
		{
			"Isrothy/snacks.nvim",
			branch = "bottom-positioning-for-qf",
			lazy = false,
			keys = {
				{
					"<LEADER>ff",
					function()
						Snacks.picker.files()
					end,
					desc = "Files",
				},
			opts = {},
		},
		-- add any other plugins here
	},
})

Screenshots

before:
Screenshot 2025-01-31 at 23 48 59

after:
Screenshot 2025-01-31 at 23 50 11

@Isrothy Isrothy changed the title fix: Enforce bottom positioning for quickfix and location lists fix(picker): Enforce bottom positioning for quickfix and location lists Feb 1, 2025
@Isrothy Isrothy force-pushed the bottom-positioning-for-qf branch from 6fc8f35 to 30d7067 Compare February 1, 2025 04:55
@Isrothy Isrothy changed the title fix(picker): Enforce bottom positioning for quickfix and location lists fix(picker): enforce bottom positioning for quickfix and location lists Feb 1, 2025
@Isrothy Isrothy force-pushed the bottom-positioning-for-qf branch from 30d7067 to eb26fe2 Compare February 1, 2025 04:59
@folke folke merged commit de16b44 into folke:main Feb 1, 2025
2 checks passed
@folke
Copy link
Owner

folke commented Feb 1, 2025

ty

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.

2 participants