Pressing <CR> on any other line does not trigger the error.
Expected behavior
The keypress should be ignored without error.
Actual behavior
This error appears:
E5108: Error executing lua: ...gins/diffview.nvim/lua/diffview/ui/panels/help_panel.lua:85: attempt to index field 'context' (a nil value)
stack traceback:
...gins/diffview.nvim/lua/diffview/ui/panels/help_panel.lua:85: in function 'apply_cmd'
...gins/diffview.nvim/lua/diffview/ui/panels/help_panel.lua:109: in function <...gins/diffview.nvim/lua/diffview/ui/panels/help_panel.lua:108>
Steps to reproduce
nvim --clean -u mini.lua
Create a dummy Git repo with :!git init, or :cd to an existing one.
:DiffviewOpen
g?
Leaving the cursor at the top of the popup window, press <CR>
Health check
Output of :checkhealth diffview
```
Checking plugin dependencies ~
- OK nvim-web-devicons installed.
Checking VCS tools ~
- The plugin requires at least one of the supported VCS tools to be valid.
- OK Git found.
- OK Git is up-to-date. (2.44.0)
- WARNING Configured `hg_cmd` is not executable: 'hg'
```
Description
When
<CR>
is pressed with the cursor on the first line of theg?
keymap overview, a Lua error is triggered by an attempt to index the nil variablecontext
athelp_panel.lua:85
: https://github.com/sindrets/diffview.nvim/blob/3dc498c9777fe79156f3d32dddd483b8b3dbd95f/lua/diffview/ui/panels/help_panel.lua#L80-L96Pressing
<CR>
on any other line does not trigger the error.Expected behavior
The keypress should be ignored without error.
Actual behavior
This error appears:
Steps to reproduce
nvim --clean -u mini.lua
:!git init
, or:cd
to an existing one.:DiffviewOpen
g?
<CR>
Health check
Output of
``` Checking plugin dependencies ~ - OK nvim-web-devicons installed. Checking VCS tools ~ - The plugin requires at least one of the supported VCS tools to be valid. - OK Git found. - OK Git is up-to-date. (2.44.0) - WARNING Configured `hg_cmd` is not executable: 'hg' ```:checkhealth diffview
Log info
No response
Neovim version
Operating system and version
Linux 6.7.8-arch1-1 x86_64 GNU/Linux
Minimal config