nvim-neoclip.lua icon indicating copy to clipboard operation
nvim-neoclip.lua copied to clipboard

Prevent storing entries that are too large

Open ouuan opened this issue 2 years ago • 3 comments

After I deleted all contents in a binary file with a size of ~10MB with enable_persistent_history enabled, neoclip hung when I entered nvim again. Maybe I shouldn't do this (deleting all contents in a binary file) in nvim, but I think we can add a length threshold to prevent this happening.

ouuan avatar Apr 21 '22 02:04 ouuan

Hi @ouuan, you an use the filter setting for this, see #55 :)

AckslD avatar Apr 21 '22 06:04 AckslD

Sorry, I forgot to search for existing issues. But I think there should be a default length limit. Maybe I can try submitting a PR later.

ouuan avatar Apr 21 '22 06:04 ouuan

No problem, feel free to submit a PR, seems fine to me to have a default limit as long as it can be changed by a user :+1:

AckslD avatar Apr 21 '22 08:04 AckslD