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: fzf-lua click handler switches to normal mode #1362

Open
2 tasks done
ObserverOfTime opened this issue Jan 11, 2025 · 0 comments
Open
2 tasks done

Bug: fzf-lua click handler switches to normal mode #1362

ObserverOfTime opened this issue Jan 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ObserverOfTime
Copy link

ObserverOfTime commented Jan 11, 2025

Self Checks

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

How to reproduce the problem

  • nvim -u lualine-fzf-issue.lua lualine-fzf-issue.lua
  • click on the filename

Expected behaviour

The fzf terminal should be in insert mode.

Actual behaviour

The fzf terminal enters insert mode but then switches to normal mode.

Minimal config to reproduce the issue

require('lazy').setup({
    root = '/tmp/lazy',
    lockfile = '/tmp/lazy-lock.json',
    spec = {
        {
            'ibhagwan/fzf-lua',
            cmd = {'FzfLua'},
            opts = {
                fzf_bin = 'sk'
            }
        },
        {
            'nvim-lualine/lualine.nvim',
            opts = {
                sections = {
                    lualine_c = {
                        {
                            'filename',
                            path = 1,
                            on_click = function()
                                require('fzf-lua').files()
                            end
                        }
                    }
                }
            }
        }
    }
})

Additional information

The fzf terminal stays in insert mode when calling the function directly.

@ObserverOfTime ObserverOfTime added the bug Something isn't working label Jan 11, 2025
@ObserverOfTime ObserverOfTime changed the title Bug: cannot enter insert mode in fzf-lua click handler Bug: fzf-lua click handler switches to normal mode Jan 11, 2025
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