Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 33946d6

Browse files
committedOct 13, 2024
fix: handle newlines in autocomplete suggestions
1 parent 7f2f74f commit 33946d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎lua/blink/cmp/windows/autocomplete.lua

+1
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ function autocomplete.draw()
250250
for _, item in ipairs(autocomplete.items) do
251251
local kind = require('blink.cmp.types').CompletionItemKind[item.kind] or 'Unknown'
252252
local kind_icon = config.kind_icons[kind] or config.kind_icons.Field
253+
item.label = item.label:gsub('\n', '\\n')
253254

254255
table.insert(
255256
components_list,

0 commit comments

Comments
 (0)
Please sign in to comment.