AckslD / nvim-neoclip.lua

Clipboard manager neovim plugin with telescope integration
995 stars 20 forks source link

Prevent storing entries that are too large #59

Open ouuan opened 2 years ago

ouuan commented 2 years ago

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.

AckslD commented 2 years ago

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

ouuan commented 2 years ago

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.

AckslD commented 2 years ago

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: