Skip to content

When closing mini.files after :edit <dir> clues sometimes don't work #2466

Description

@abeldekat

Contributing guidelines

Module(s)

mini.clue, mini.files

Neovim version

0.13 (!at least latest Nightly build!)

Description

When closing mini.files after :edit <dir> clues don't work when there is no alternate file.

Expected: if the target buffer is listed, mini.clues always attaches after closing the default explorer.

EDIT: The same behavior can be observed when 'mini.starter' is included.

Reproduction

  1. Create separate 'nvim-repro' config directory:

    • '~/.config/nvim-repro/' on Unix
    • '~/AppData/Local/nvim-repro/' on Windows
  2. Inside 'nvim-repro' directory create a file named 'init.lua'.
    Populate it with the following content:

vim.pack.add({ 'https://github.com/nvim-mini/mini.nvim' })

local minimisc = require('mini.misc')
local later = function(f) minimisc.safely('later', f) end

vim.g.mapleader = ' '
require('mini.files').setup()
later(
  function()
    require('mini.clue').setup({
      clues = {
        { mode = 'n', keys = '<Leader>e', desc = '+Explore/Edit' },
      },
      triggers = {
        { mode = { 'n', 'x' }, keys = '<Leader>' },
      },
    })
  end
)
  1. Run NVIM_APPNAME=nvim-repro nvim (i.e. execute nvim with NVIM_APPNAME environment variable set to "nvim-repro").
    Wait for all dependencies to install.

  2. Steps

  • Open nvim
  • Press leader and note that the clue activates
  • Type :edit .
  • Type q
  • Press leader and note that the clue does not activate
What to do after reporting an issue

After reporting the issue, it is safe (and even recommended for cleaner possible future bug reports) to remove 'nvim-repro' config from the system:

  • Delete config directory ('~/.config/nvim-repro' on Unix).
  • Delete data directory ('~/.local/share/nvim-repro' on Unix).
  • Delete state directory ('~/.local/state/nvim-repro' on Unix).

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions