Description
I noticed that opening a file in Telescope sometimes won't replace the empty [No Name] buffer. After some testing I figured out this happens only if the target file has been opened at least once in a NeoVim session (not necessarily by Telescope, :e ... or Nvim-Tree can also cause this).
Neovim version
NVIM v0.11.6
Build type: RelWithDebInfo
LuaJIT 2.1.1767980792
Run "nvim -V1 -v" for more info
Operating system and version
Arch Linux x86_64
Telescope version / branch / rev
Telescope master
checkhealth telescope
Checking for required plugins ~
- ✅ OK plenary installed.
Checking external dependencies ~
- ✅ OK rg: found ripgrep 15.1.0
- ✅ OK fd: found fd 10.3.0
Steps to reproduce
- Launch NeoVim (with
nvim -nu minimal.lua)
- Open a file using Telescope
- See that the [No Name] buffer is replaced by the target file
- Restart NeoVim
- Open a file using either Telescope, Nvim-Tree or
:e ..., etc.
- Close the file
- Re-open the same file using Telescope
- See that the [No Name] buffer is no longer replaced by the target file
- Open a different file
- See that the [No Name] buffer is replaced again
Expected behavior
When the [No Name] buffer is focused and it is completely empty, Telescope should always replace it with the target file.
Actual behavior
As described above
Minimal config
local Plug = vim.fn["plug#"]
vim.call("plug#begin")
Plug "nvim-lua/plenary.nvim"
Plug "nvim-telescope/telescope.nvim"
Plug ("nvim-telescope/telescope-fzf-native.nvim", { ["do"]="cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release" })
vim.call("plug#end")
require("telescope").setup {}
Description
I noticed that opening a file in Telescope sometimes won't replace the empty [No Name] buffer. After some testing I figured out this happens only if the target file has been opened at least once in a NeoVim session (not necessarily by Telescope,
:e ...or Nvim-Tree can also cause this).Neovim version
Operating system and version
Arch Linux x86_64
Telescope version / branch / rev
Telescope master
checkhealth telescope
Steps to reproduce
nvim -nu minimal.lua):e ..., etc.Expected behavior
When the [No Name] buffer is focused and it is completely empty, Telescope should always replace it with the target file.
Actual behavior
As described above
Minimal config