data-viewer.nvim icon indicating copy to clipboard operation
data-viewer.nvim copied to clipboard

bug: can't run `:DataViewer` twice

Open alxndr opened this issue 1 year ago • 1 comments

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

  1. open a .csv file
  2. run :DataViewer
  3. close the DataViewer floating window with :q
  4. run :DataViewer again

Expected Behavior

the DataViewer window should open again

alxndr avatar Jul 29 '24 17:07 alxndr

@alxndr hey, i just fixed this bug, you can visit to my repo of this project

0xbdg avatar Sep 06 '25 14:09 0xbdg