Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
treequin opened this issue Apr 8, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@treequin
Copy link

treequin commented Apr 8, 2024

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).

@treequin treequin added the bug Something isn't working label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant