nvim-telescope/telescope.nvim

The mark picker over-normalises filenames, e.g., oil.nvim buffer

gzbfgjf2 opened this issue · 1 comments

Description

After #2859, all mark filenames are normalized. For example, marked filenames are changed from {plugin}:///{path} to {plugin}:/{path}, e.g., fugitive and oil buffers. This causes a problem where selecting the buffer does not open the intended marked buffer.

Neovim version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

Operating system and version

macOS 14.4.1

Telescope version / branch / rev

master

checkhealth telescope

telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- WARNING nvim-treesitter not found. (Required for `:Telescope treesitter`.)

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 9.0.0

===== Installed extensions ===== ~

Steps to reproduce

  1. nvim -u minimal.lua
  2. :Oil
  3. mA
  4. :Telescope marks
  5. select mark A

Expected behavior

open the originally marked oil buffer

Actual behavior

a new buffer oil:/{path} opened instead of oil:///{path}

Minimal config

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "stevearc/oil.nvim",
    config = function()
      require("oil").setup({
        -- add any needed settings here
      })
    end,
  },
  {
    'nvim-telescope/telescope.nvim',
    dependencies = { 'nvim-lua/plenary.nvim' }
  }
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

Close as #3029 was merged.