From 359dc2229d65625d552b9231d2aed53ca5618325 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Sun, 21 Dec 2025 15:29:12 -0800 Subject: [PATCH] fix: exclude snacks_picker_list from main editor window detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add snacks_picker_list filetype to the exclusion list in: - find_main_editor_window(): prevents picker from being selected as target - _create_diff_view_from_window(): creates split when picker is focused This fixes diff view behavior when using snacks.nvim picker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- lua/claudecode/diff.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/claudecode/diff.lua b/lua/claudecode/diff.lua index d590710f..7e1b8f07 100644 --- a/lua/claudecode/diff.lua +++ b/lua/claudecode/diff.lua @@ -73,6 +73,7 @@ local function find_main_editor_window() or filetype == "netrw" or filetype == "aerial" or filetype == "tagbar" + or filetype == "snacks_picker_list" ) then is_suitable = false @@ -918,7 +919,7 @@ function M._create_diff_view_from_window( local buftype = vim.api.nvim_buf_get_option(buf, "buftype") local filetype = vim.api.nvim_buf_get_option(buf, "filetype") - if buftype == "terminal" or buftype == "prompt" or filetype == "neo-tree" then + if buftype == "terminal" or buftype == "prompt" or filetype == "neo-tree" or filetype == "snacks_picker_list" then create_split() end