Skip to content

Commit

Permalink
fix: pcall nvim_get_current_line before vim.trim
Browse files Browse the repository at this point in the history
Change-Id: Ia58ffac8bd1973ed08b99436a6adeb196dbba438
  • Loading branch information
younger-1 committed May 26, 2024
1 parent 474ee47 commit 55ba382
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/telescope/pickers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ function Picker:find()
_, self.original_cword = pcall(vim.fn.expand, "<cword>")
_, self.original_cWORD = pcall(vim.fn.expand, "<cWORD>")
_, self.original_cfile = pcall(vim.fn.expand, "<cfile>")
_, self.original_cline = pcall(vim.trim, vim.api.nvim_get_current_line())
_, self.original_cline = pcall(vim.api.nvim_get_current_line)
_, self.original_cline = pcall(vim.trim, self.original_cline)

-- User autocmd run it before create Telescope window
vim.api.nvim_exec_autocmds("User", { pattern = "TelescopeFindPre" })
Expand Down

0 comments on commit 55ba382

Please sign in to comment.