Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
gtr wants to merge 1 commit into
dmtrKovalenko:main from
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 into
dmtrKovalenko:main from
gtr:fix/grep-renderer-blob-detection

Conversation

@gtr

@gtr gtr commented Apr 17, 2026
edited
Loading

Copy link
Copy Markdown

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.

lalvarezt reacted with thumbs up emoji
@gtr gtr force-pushed the fix/grep-renderer-blob-detection branch from 6254b71 to 75c3c87 Compare April 17, 2026 18:58

Copy link
Copy Markdown

this solves the issues I was having, thanks. Hopefully it will be merged soon

gtr reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Crashing when pressing '\'

2 participants

AltStyle によって変換されたページ (->オリジナル) /