data-viewer.nvim
data-viewer.nvim copied to clipboard
bug: can't run `:DataViewer` twice
Did you check docs and existing issues?
- [X] I have read all the plugin docs
- [X] I have searched the existing issues
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713773202
Operating system/version
MacOS 14.5 (23F79)
Describe the bug
I see the below error when I attempt to run :DataViewer for the 2nd time on a .csv buffer. This comes about if I've opened a CSV file and used DataViewer floating window to look at it for a bit, then close DataViewer, but then want to use it again.
Error executing Lua callback: ...k/paqs/start/data-viewer.nvim/lua/data-viewer/module.lua:109: Vim:E95: Buffer with this name already exists
stack traceback:
[C]: in function 'nvim_buf_set_name'
...k/paqs/start/data-viewer.nvim/lua/data-viewer/module.lua:109: in function 'create_bufs'
...ite/pack/paqs/start/data-viewer.nvim/lua/data-viewer.lua:64: in function <...ite/pack/paqs/start/data-viewer.nvim/lua/data-viewer.lua:28>
It does not appear to happen with view = { float = false }
Steps To Reproduce
- open a
.csvfile - run
:DataViewer - close the DataViewer floating window with
:q - run
:DataVieweragain
Expected Behavior
the DataViewer window should open again
@alxndr hey, i just fixed this bug, you can visit to my repo of this project