Skip to content

Defer start_polling() till VimEnter#32

Open
ShayHill wants to merge 1 commit into
rishi-opensource:mainfrom
ShayHill:main
Open

Defer start_polling() till VimEnter#32
ShayHill wants to merge 1 commit into
rishi-opensource:mainfrom
ShayHill:main

Conversation

@ShayHill

@ShayHill ShayHill commented Jul 8, 2026

Copy link
Copy Markdown

Wrap claude_code#diff#start_polling() in a VimEnter augroup to allow Vim to set shellxquote before calling git.

Patch: failure to execute claude_code#diff#start_polling().

This bug likely requires installing the plugin to the Vim8 pack directory.

  • $MYVIMDIR\pack\...\start\vim-claude-code
  • set g:claude_code_diff_preview = 1

s:dispatch_preview runs before VimEnter. When g:claude_code_diff_preview = 1, s:dispatch_preview calls claude_code#diff#start_polling(), which eventually calls git, which fails because shellxquote is empty while the vimrc is parsed. Vim sets shellxquote before VimEnter so, with the patch, the call to git happens (and succeeds) after shellxquote is set.

Wrap `claude_code#diff#start_polling()` in a VimEnter augroup to allow
Vim to set shellxquote.
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