From 6b820258cdd6b2da17e1f8e598b1776f0de8ddba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maria=20Jos=C3=A9=20Solano?= Date: Sat, 26 Jul 2025 19:47:28 -0700 Subject: [PATCH] fix(lsp): don't override `config.title` in `vim.lsp.buf.signature_help()` #35075 (cherry picked from commit afebbd0f34cacf6d39a1a158278489adb40ede45) --- runtime/lua/vim/lsp/buf.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 9e0cc43c55..ee77b68362 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -389,11 +389,9 @@ function M.signature_help(config) local sfx = total > 1 and string.format(' (%d/%d)%s', idx, total, can_cycle and ' ( to cycle)' or '') or '' - local title = string.format('Signature Help: %s%s', client.name, sfx) - if config.border then - config.title = title - else - table.insert(lines, 1, '# ' .. title) + config.title = config.title or string.format('Signature Help: %s%s', client.name, sfx) + if not config.border then + table.insert(lines, 1, '# ' .. config.title) if hl then hl[1] = hl[1] + 1 hl[3] = hl[3] + 1