Skip to content

[Bug] :DiffViewOpen fails when file_panel = { show=false } in config #74

@dsirov

Description

@dsirov

Description

:DiffViewOpen fails when in config:

      file_panel = {
        show = false,
      },

Expected behavior

opened diffview without file panel

Actual behavior

   Error  09:24:57 msg_show.lua_error   Dif Error executing vim.schedule lua callback: ...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:187: The coroutine failed with this message: 
	context: cur_thread=main co_thread=<thread 0x7fefac2807d8> co_func=...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:433
...ffview.nvim/lua/diffview/scene/views/diff/file_panel.lua:125: attempt to index field 'render_data' (a nil value)
stack traceback:
	...ffview.nvim/lua/diffview/scene/views/diff/file_panel.lua: in function 'update_components'
	...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:636: in function 'func'
	...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:373: in function <...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:358>
stack traceback:
	[C]: in function 'error'
	...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:187: in function 'raise'
	...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:215: in function 'step'
	...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:247: in function 'notify_all'
	...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:222: in function 'step'
	...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:399: in function <...hare/nvim-test/lazy/diffview.nvim/lua/diffview/async.lua:391>
09:24:51 msg_showcmd :

Steps to reproduce

Install vanila LazyVim with diffview

git clone https://github.com/LazyVim/starter ~/.config/lazvyvim-test

install diffview by adding ~/.config/lazvyvim-test/lua/plugins/diffview.lua:

return {
  {
    "dlyongemallo/diffview.nvim",
    cmd = {
      "DiffviewOpen",
    },
    config = {
      enhanced_diff_hl = true,
      use_icons = true,
      file_panel = {
        show = false,
      },
    },
  },
}

Run this LazyVim environment:

NVIM_APPNAME=lazvyvim-test nvim

create a new test.c file:

int main() { return 0 };

commit it:

git init
git add test.c
git commit

NVIM_APPNAME=lazvyvim-test nvim test.c
modify file contents to

int main() { return 1};

:DiffViewOpen

Health check

Output of :checkhealth diffview
==============================================================================
diffview:                                                                 2 ⚠️

Checking plugin dependencies ~
- ✅ OK nvim-web-devicons installed.
- ✅ OK mini.icons installed.

Checking VCS tools ~
- The plugin requires at least one of the supported VCS tools to be valid.
- ⚠️ WARNING Configured `jj_cmd` is not executable: 'jj'
- ✅ OK Git found.
- ✅ OK Git is up-to-date. (2.53.0)
- ✅ OK Mercurial found.
- ✅ OK Mercurial is up-to-date. (7.1.1)
- ⚠️ WARNING Configured `p4_cmd` is not executable: 'p4'

Log info

Relevant info from :DiffviewLog
[INFO  2026-03-31 09:24:57.408 +0300] .../share/nvim-test/lazy/diffview.nvim/lua/diffview/lib.lua:47: [command call] :DiffviewOpen 

Neovim version

NVIM v0.11.6
Build type: RelWithDebInfo
LuaJIT 2.1.1767980792
Run "nvim -V1 -v" for more info

Operating system and version

Linux 6.18.13-200.fc43.x86_64 x86_64 GNU/Linux

Minimal config

`~/.config/lazvyvim-test/lua/plugins/diffview.lua`:

return {
  {
    "dlyongemallo/diffview.nvim",
    cmd = {
      "DiffviewOpen",
    },
    config = {
      enhanced_diff_hl = true,
      use_icons = true,
      file_panel = {
        show = false,
      },
    },
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions