Skip to content

fix: use vim.fn.type() to detect Blobs in grep renderer#386

Open
gtr wants to merge 1 commit intodmtrKovalenko:mainfrom
gtr:fix/grep-renderer-blob-detection
Open

fix: use vim.fn.type() to detect Blobs in grep renderer#386
gtr wants to merge 1 commit intodmtrKovalenko:mainfrom
gtr:fix/grep-renderer-blob-detection

Conversation

@gtr
Copy link
Copy Markdown

@gtr gtr commented Apr 17, 2026

Lua's type() returns "string" for Vim Blobs so the existing guard on line_content never fires. This causes E976 (Blob as String) when strdisplaywidth receives a Blob from vim.json.decode.

This commit uses vim.fn.type() == vim.v.t_blob instead which correctly identifies Blobs, then converts to a proper Lua string via blob2list. Fixes #310 - the previous fix on #342 was insufficient.

@gtr gtr force-pushed the fix/grep-renderer-blob-detection branch from 6254b71 to 75c3c87 Compare April 17, 2026 18:58
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.

Crashing when pressing '\'

1 participant