Skip to content

Commit b75cafc

Browse files
tuannvmclaude
andauthored
fix: exclude snacks_picker_list from main editor window detection (#165)
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 <noreply@anthropic.com>
1 parent 6091df0 commit b75cafc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lua/claudecode/diff.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ local function find_main_editor_window()
7373
or filetype == "netrw"
7474
or filetype == "aerial"
7575
or filetype == "tagbar"
76+
or filetype == "snacks_picker_list"
7677
)
7778
then
7879
is_suitable = false
@@ -918,7 +919,7 @@ function M._create_diff_view_from_window(
918919
local buftype = vim.api.nvim_buf_get_option(buf, "buftype")
919920
local filetype = vim.api.nvim_buf_get_option(buf, "filetype")
920921

921-
if buftype == "terminal" or buftype == "prompt" or filetype == "neo-tree" then
922+
if buftype == "terminal" or buftype == "prompt" or filetype == "neo-tree" or filetype == "snacks_picker_list" then
922923
create_split()
923924
end
924925

0 commit comments

Comments
 (0)