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: (dashboard) error thrown when all keys are hidden #273

Closed
4 tasks done
constantitus opened this issue Dec 12, 2024 · 0 comments · Fixed by #272
Closed
4 tasks done

bug: (dashboard) error thrown when all keys are hidden #273

constantitus opened this issue Dec 12, 2024 · 0 comments · Fixed by #272
Labels
bug Something isn't working

Comments

@constantitus
Copy link

constantitus commented Dec 12, 2024

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

Operating system/version

linux

Describe the bug

When all keys in dashboard are hidden, it throws an error.

Error detected while processing CursorMoved Autocommands for "<buffer=1>":
Error executing lua callback: ...cal/share/nvim/lazy/snacks.nvim/lua/snacks/dashboard.lua:724: attempt to index field '_' (a
nil value)
stack traceback:
        ...cal/share/nvim/lazy/snacks.nvim/lua/snacks/dashboard.lua:724: in function <...cal/share/nvim/lazy/snacks.nvim/lua/
snacks/dashboard.lua:713>
Press ENTER or type command to continue

Steps To Reproduce

run the minimal reproduction file down below

Expected Behavior

let me have no visible keys ?

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 = {
                    enabled = true,
                    preset = {
                        keys = {
                            { key = "e", action = ":ene", hidden = true }
                        }
                    }
                }
            }
        },
        -- add any other plugins here
    },
})
@constantitus constantitus added the bug Something isn't working label Dec 12, 2024
@folke folke closed this as completed in 7c7b18f Dec 13, 2024
folke pushed a commit that referenced this issue Dec 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.10.0](v2.9.0...v2.10.0)
(2024-12-13)


### Features

* **animate:** add done to animation object
([ec73346](ec73346))
* **lazygit:** respect existing LG_CONFIG_FILE when setting config paths
([#208](#208))
([ef114c0](ef114c0))
* **scroll:** added spamming detection and disable animations when user
is spamming keys :)
([c58605f](c58605f))
* **scroll:** improve smooth scrolling when user is spamming keys
([5532ba0](5532ba0))
* **zen:** added on_open / on_close callbacks
([5851de1](5851de1))
* **zen:** make zen/zoom mode work for floating windows. Closes
[#5028](https://github.com/folke/snacks.nvim/issues/5028)
([05bb957](05bb957))


### Bug Fixes

* **dashboard:** set cursor to non-hidden actionable items. Fixes
[#273](#273)
([7c7b18f](7c7b18f))
* **indent:** fix rendering issues when `only_scope` is set for indent.
Fixes [#268](#268)
([370703d](370703d))
* **indent:** only render adjusted top/bottom. See
[#268](#268)
([54294cb](54294cb))
* **notifier:** set `modifiable=false` for notifier history
([12e68a3](12e68a3))
* **scope:** change from/to selection to make more sense
([e8dd394](e8dd394))
* **scope:** possible loop? See
[#278](#278)
([ac6a748](ac6a748))
* **scratch:** normalize filename
([5200a8b](5200a8b))
* **scroll:** don't animate scroll distance 1
([a986851](a986851))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

1 participant