From da2c0fe3df147cb702b90a25fcb72bf6871b50b8 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Mon, 10 Jan 2022 08:00:25 -0800 Subject: [PATCH] bugfix: 'lines|blines' default action in term buffers --- lua/fzf-lua/providers/buffers.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/providers/buffers.lua b/lua/fzf-lua/providers/buffers.lua index add8ab7..59c7441 100644 --- a/lua/fzf-lua/providers/buffers.lua +++ b/lua/fzf-lua/providers/buffers.lua @@ -251,9 +251,10 @@ M.buffer_lines = function(opts) if line then -- add current location to jumplist - vim.cmd("normal! m`") + local is_term = utils.is_term_buffer(0) + if not is_term then vim.cmd("normal! m`") end vim.api.nvim_win_set_cursor(0, {line, 0}) - vim.cmd("norm! zz") + if not is_term then vim.cmd("norm! zz") end end end)()