-
Notifications
You must be signed in to change notification settings - Fork 201
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
buffer completion for large CJK document leads to segmentation fault of neovim #560
Comments
Do we really need this '+ 1'? blink.cmp/lua/blink/cmp/sources/buffer.lua Lines 21 to 24 in 217f670
It also produces a (seemingly) weird chunk: Typing
with {
_line = "Lorem i dolor sit amet, consectetur adipiscing elit. Gravida mus sociosqu"
} without {
_line = "Lorem dolor sit amet, consectetur adipiscing elit. Gravida mus sociosqu"
} Typing foo("{cursor}") with {
_line = 'foo("b ")'
}
{
_line = 'foo("bar b ")'
} without {
_line = 'foo(" ")'
}
{
_line = 'foo("bar ")'
} |
confirmed |
Thanks for debugging this @itepechi! |
Make sure you have done the following
blink.cmp
Bug Description
I'm using LazyVim, which enables the
buffer
completion source for blink.cmphttps://github.com/LazyVim/LazyVim/blob/dc4345a5ee23ffb4aad50c01eca49d5bc47a96c3/lua/lazyvim/plugins/extras/coding/blink.lua#L76
when editing a large CJK document and modifying a long sentence in insert mode, neovim crashes with a segmentation fault right after the modification.
I can no longer reproduce the crash once I disable buffer from completion sources, so I suspect there's something wrong with it
this is a random large Chinese document for reproducing the issue
https://github.com/ArcturusZhang/Classical-Mechanics-Lecture-Notes/raw/refs/heads/master/chapter/chapter2.tex
here is a cast for the issue

below is the stack trace
Relevant configuration
neovim version
v0.10.2
blink.cmp
version: branch, tag, or commitv0.7.6
The text was updated successfully, but these errors were encountered: