deadcolumn.nvim icon indicating copy to clipboard operation
deadcolumn.nvim copied to clipboard

fix: calculate blob line without strdisplaywidth

Open aileot opened this issue 1 year ago • 2 comments

This is a workaround for the error "E976: using Blob as a String" on strdisplaywidth.

aileot avatar May 04 '24 11:05 aileot

Hoping this can be merged soon! This issue is annoying when opening the cmdline in binary files

ribru17 avatar Jun 15 '24 00:06 ribru17

Sorry for the late reply. I've missed your review. I agree with you, but the magic number should be replaced.

aileot avatar Jun 22 '24 12:06 aileot

I believe using vim.fn.getline() instead of vim.api.nvim_get_current_line() solves this issue. Can you confirm?

Bekaboo avatar Oct 25 '24 16:10 Bekaboo

Yes, I can confirm it. It appears reasonable that vim.fn.getline() should have higher compatibility with the irreplaceable endpoint vim.fn.strdisplaywidth() since both are native Vim functions.

aileot avatar Oct 27 '24 02:10 aileot