folke / snacks.nvim

🍿 A collection of small QoL plugins for Neovim
Apache License 2.0
1.34k stars 28 forks source link

bug: Terminal statusline flashing when typing #22

Closed dotfrag closed 3 weeks ago

dotfrag commented 3 weeks ago

I was meaning to open in this in LazyVim, sorry. Please close.

https://github.com/LazyVim/LazyVim/issues/4724

dpetka2001 commented 3 weeks ago

@dotfrag This seems to be related to this Lualine commit. I reverted the commit to the previous one and it doesn't happen.

However, it only happens with Snacks.terminal. The default Neovim terminal when opened with :terminal doesn't seem to be affected from my tests, so it seems to be Snacks.terminal with regards to recent Lualine commit related.

Would you be willing to re-open this, so that Folke can have a look?

folke commented 3 weeks ago

@dpetka2001 this is a repro:

vim.cmd("botright 20 split")
vim.cmd.terminal()
vim.keymap.set("t", "<esc><esc>", "<C-\\><C-n>")
vim.opt_local.winbar = "title: %{b:term_title}" -- this causes the flickering
vim.cmd.startinsert()

Would be great if someone could report to lualine...

folke commented 3 weeks ago

Opened https://github.com/nvim-lualine/lualine.nvim/issues/1323

dpetka2001 commented 3 weeks ago

On an unrelated note could you help how to open the terminal in float position by default? I tried

opts = {
        terminal = {
          win = {
            position = "float",
          },
        },
}

but it's not working. But maybe I'm doing something wrong.

folke commented 3 weeks ago

That was a bug. Just fixed it :)

folke commented 3 weeks ago

not yet

folke commented 3 weeks ago

nw it should be good

dpetka2001 commented 3 weeks ago

Thank you!!