Skip to content

bug: opening a new tab with :tabnew from the dashboard does not restore old settings #1774

@mehalter

Description

@mehalter

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.11.0

Operating system/version

Arch linux

Describe the bug

If I open a new tab page while on the dashboard the new tabpage will not have the correct settings applied. When running :tabnew it should see that I'm no longer in the dashboard buffer and re-enable tabline/statusline.

Steps To Reproduce

  1. nvim -u repro.lua, start a new session (which opens the dashboard by default
  2. :tabnew, open a new tab page
  3. See that statusline is still hidden

Expected Behavior

When opening a new tab, my settings should be reset to what I would expect them to be rather than still reflecting the settings which hide UI elements for the dashboard

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/snacks.nvim", opts = { dashboard = {} } },
    -- add any other plugins here
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions