Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #25 Fixes vim:E976 error when cursor is on a blob. #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rpopic2
Copy link

@rpopic2 rpopic2 commented Feb 11, 2023

  • How to reproduce the original error:
    Error executing lua callback: Vim:E976: using Blob as a String #25
    Open any binary file, move cursor on a blob(blue characters starting with ^), throws vim:E976.
    This error is thrown when blob is provided for function vim.fn.matchstr(), instead of a string.
  • What changes I've made:
    • In function matchadd() (line 12),
    • Check whether the current line is a blob, seeing if fn.type(line) is a vim.v.t_blob.
    • If it is a blob, return early from matchadd()
  • Test results:
    I tried reproducing the bug as I mentioned above, and it was fixed.
    Testing environment: MacOS Ventura 13.1, Apple M2, nvim v0.8.3

@Forsigg
Copy link

Forsigg commented Jul 16, 2024

Hello! I see that PR approved, but not merged. I also get this error from issue. @alanchenvon please merge that PR if all ok. And thanks @rpopic2 for that fix!

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.

3 participants