Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Diffview cannot be shown when file is changed into folder #523

Open
rosstang opened this issue Jul 17, 2024 · 0 comments
Open

[Bug] Diffview cannot be shown when file is changed into folder #523

rosstang opened this issue Jul 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rosstang
Copy link

rosstang commented Jul 17, 2024

Description

When a file is deleted and a new folder is created with the same new, with some files in it, the diff view shows an error and can't do the diff.

Expected behavior

It should diff correctly.

Actual behavior

The following output is shown instead,

Error executing vim.schedule lua callback: ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message:
        context: cur_thread=main co_thread=<thread 0x738851a2b2b8> co_func=...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:327
.../share/nvim/lazy/diffview.nvim/lua/diffview/renderer.lua:166: attempt to get length of local 'text' (a function value)
stack traceback:
        .../share/nvim/lazy/diffview.nvim/lua/diffview/renderer.lua: in function 'add_text'
        ...y/diffview.nvim/lua/diffview/scene/views/diff/render.lua:107: in function 'render_file_tree_recurse'
        ...y/diffview.nvim/lua/diffview/scene/views/diff/render.lua:120: in function 'render_file_tree'
        ...y/diffview.nvim/lua/diffview/scene/views/diff/render.lua:130: in function 'render_files'
        ...y/diffview.nvim/lua/diffview/scene/views/diff/render.lua:176: in function <...y/diffview.nvim/lua/diffview/scene/views/diff/render.lua:134>
        ...ffview.nvim/lua/diffview/scene/views/diff/file_panel.lua:400: in function 'render'
        ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:465: in function 'func'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:373: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:215: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:222: in function 'step'
        ...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:399: in function <...cal/share/nvim/lazy/diffview.nvim/lua/diffview/async.lua:391>

Steps to reproduce

  1. A simple repo is checkout: git clone [email protected]:rosstang/diffview.git
  2. In nvim, run :DiffviewOpen origin/test
  3. The above error messages show up, and the diff view is empty

Health check

Output of :checkhealth diffview
   2 diffview:
   3
   4 - ERROR No healthcheck found for "diffview" plugin.
   5

Log info

Relevant info from :DiffviewLog
############################
### PUT LOG CONTENT HERE ###
############################

Neovim version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

Operating system and version

Linux 6.5.0-41-generic x86_64 GNU/Linux

@rosstang rosstang added the bug Something isn't working label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant