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

On opening/scrolling some binary files: "vim-illuminate: An internal error has occured: false"Vim:E976: using Blob as a String" #186

Open
andis-sprinkis opened this issue Nov 19, 2023 · 1 comment
Assignees

Comments

@andis-sprinkis
Copy link

andis-sprinkis commented Nov 19, 2023

Describe the bug
A clear and concise description of what the bug is.

An error message occurs on opening and scrolling through some binary files.

To Reproduce
Steps to reproduce the behavior (include minimal init.vim or .vimrc):

  1. nvim test.txt
    test.txt (this is a chunk of a WAV file from Wikipedia)
  2. See error
    vim-illuminate: An internal error has occured: false"Vim:E976: using Blob as a String"
    

Config. - just vim-illuminate installed with lazy.nvim.

Note Omitting a minimal init.vim/init.lua/.vimrc will likely result in the issue being closed without explanation.

Output from :IlluminateDebug

buf_should_illuminate 1 true
config {
  case_insensitive_regex = false,
  delay = 100,
  filetype_overrides = {},
  filetypes_allowlist = {},
  filetypes_denylist = { "dirbuf", "dirvish", "fugitive" },
  min_count_to_highlight = 1,
  modes_allowlist = {},
  modes_denylist = {},
  providers = { "lsp", "treesitter", "regex" },
  providers_regex_syntax_allowlist = {},
  providers_regex_syntax_denylist = {},
  under_cursor = true
}
started false
provider table: 0x7ff0e85b7590 regex
`termguicolors` false

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
1700416619

Additional context
Add any other context about the problem here.

@andis-sprinkis andis-sprinkis changed the title On opening/scrolling a binary file: "vim-illuminate: An internal error has occured: false"Vim:E976: using Blob as a String" On opening/scrolling some binary files: "vim-illuminate: An internal error has occured: false"Vim:E976: using Blob as a String" Nov 19, 2023
@RRethy RRethy self-assigned this Dec 24, 2023
@RRethy
Copy link
Owner

RRethy commented Dec 24, 2023

Not sure how to fix this, I'll leave it open in case someone has any ideas. The error seems to be a result of string.format returning a blob which we then pass to vim.escape which is no bueno, but I'm not sure how to convert it to a string and I don't understand why string.format is even returning a blob. Looking at the Neovim source code would probably clear things up but I'm probably not going to spend a significant amount of time fixing this due to how rare it is.

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

No branches or pull requests

2 participants