Skip to content

Commit

Permalink
fix(tags): Restore searching for tag when line is not in ctags
Browse files Browse the repository at this point in the history
It looks like a Lua gotcha, 0 is truthy. When the line information is
absent in the tags file, the search behavior isn’t available.
  • Loading branch information
francoisfreitag authored and ibhagwan committed Dec 12, 2024
1 parent 545e789 commit 2b35807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fzf-lua/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ M.vimcmd_entry = function(_vimcmd, selected, opts, pcall_vimcmd)
else
utils.jump_to_location(entry, "utf-16")
end
elseif entry.ctag and not entry.line then
elseif entry.ctag and entry.line == 0 then
vim.api.nvim_win_set_cursor(0, { 1, 0 })
vim.fn.search(entry.ctag, "W")
elseif not opts.no_action_set_cursor and entry.line > 0 or entry.col > 0 then
Expand Down

0 comments on commit 2b35807

Please sign in to comment.