From 865c42d51d11bd2b8349cfd1f5e42dd142b842e3 Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Tue, 11 Jun 2024 20:53:02 +0800 Subject: [PATCH] fix: escape char % is not handled origin pr is https://github.com/nvimdev/lspsaga.nvim/pull/1363, but seems it is missing, so I pr it again close: https://github.com/nvimdev/lspsaga.nvim/issues/1362 --- lua/lspsaga/symbol/winbar.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lspsaga/symbol/winbar.lua b/lua/lspsaga/symbol/winbar.lua index b2c630d8c..326819cce 100644 --- a/lua/lspsaga/symbol/winbar.lua +++ b/lua/lspsaga/symbol/winbar.lua @@ -27,6 +27,9 @@ local function path_in_bar(buf) end for item in util.path_itera(buf) do + if string.find(item, '%%') then + item = item:gsub('%%', '%%%%') + end item = #items == 0 and '%#' .. (hl or 'SagaFileIcon') .. '#' .. (icon and icon .. ' ' or '') .. '%*' .. bar.prefix .. 'FileName#' .. item or bar.prefix