nvim-lualine/lualine.nvim

Bug: on_click option not working in components 'buffers' and 'tabs'

treequin opened this issue · 0 comments

Self Checks

  • I'm using the latest lualine.
  • I didn't find the issue in existing issues or PRs.

How to reproduce the problem

  1. Click on the mode component. "on_click works" is echoed.
  2. Click on the buffers component. Nothing is echoed.
  3. Click on the tabs component. Nothing is echoed.

Expected behaviour

on_click works when used in buffers and tabs.

Actual behaviour

on_click works in other components, but no in these.

Minimal config to reproduce the issue

call plug#begin("/home/usuario/lualine-bug/.local/share/nvim/plugged")
Plug 'nvim-lualine/lualine.nvim'
call plug#end()

lua << END
require'lualine'.setup {
sections = {
        lualine_a = {
            {
                'mode',
                on_click = function()
                    vim.cmd('echo "on_click works"')
                end,
            },
        },
    },
tabline = {
        lualine_a = {
            {
                'buffers',
                on_click = function()
                vim.cmd('echo "on_click does not work"')
                end,
            },

        },
        lualine_z = {
            {
                'tabs',

                on_click = function()
                vim.cmd('echo "on_click does not work"')
                end,
            },
        },
    },
}
END

Additional information

Tested on latest stable (v0.9.5) and latest nightly (v0.10.0-dev-2830+g541c2d381).