Skip to content

fix oops#2126

Merged
ibhagwan merged 2 commits intoibhagwan:mainfrom
phanen:fix-oops
Jun 21, 2025
Merged

fix oops#2126
ibhagwan merged 2 commits intoibhagwan:mainfrom
phanen:fix-oops

Conversation

@phanen
Copy link
Copy Markdown
Collaborator

@phanen phanen commented Jun 21, 2025

  • fix: typo
  • feat(history): ts highlight on search regex

I should have push this (search_history broken) but on wrong local branch...

@ibhagwan ibhagwan merged commit d598d56 into ibhagwan:main Jun 21, 2025
6 checks passed
@ibhagwan
Copy link
Copy Markdown
Owner

Something is still off, ts he for search is botched and fzf loading indicator never stops spinning.

IMG_3420

@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Jun 21, 2025

I missed this, but I cannot reproduce the spinner issue.

diff --git a/lua/fzf-lua/win.lua b/lua/fzf-lua/win.lua
index 2ea14c7..b40ecd1 100644
--- a/lua/fzf-lua/win.lua
+++ b/lua/fzf-lua/win.lua
@@ -898,7 +898,7 @@ function FzfWin:treesitter_attach()
           -- line:col:text        (grep_curbuf)
           -- line<U+00A0>text     (lines|blines)
           ---@diagnostic disable-next-line: unused-local
-          local filepath, _lnum, text = line_parser(line:sub(min_col))
+          local filepath, _lnum, text, _ft = line_parser(line:sub(min_col))
           if not text or text == 0 then return end
 
           text = text:gsub("^%d+:", "") -- remove col nr if exists
@@ -916,8 +916,8 @@ function FzfWin:treesitter_attach()
             end
           end)()
 
-          local ft = ft_bufnr and vim.bo[tonumber(ft_bufnr)].ft
-              or vim.filetype.match({ filename = path.tail(filepath) })
+          local ft = _ft or (ft_bufnr and vim.bo[tonumber(ft_bufnr)].ft
+            or vim.filetype.match({ filename = path.tail(filepath) }))
           if not ft then return end
 
           local lang = vim.treesitter.language.get_lang(ft)

@ibhagwan
Copy link
Copy Markdown
Owner

I missed this, but I cannot reproduce the spinner issue.

This was happening if the last bulk is partial, e.g you have history of 600, the last bulk would be 100 and count never gets to 0.

fixed in 037ba12.

@ibhagwan
Copy link
Copy Markdown
Owner

7af7336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants