Closed dansdantas closed 6 months ago
thx, fixed
I am still seeing this issue with the latest version of both plugins.
@kevintraver works on my end, with and without the max_width
config from nvim-notify.
Could you please post the error you are getting?
msg_show.emsg E5108: Error executing lua: .../nvim-tinygit/lua/tinygit/commands/commit-and-amend.lua:193: attempt to perform arithmetic on field 'max_width' (a function value)
If I set max_width
in nvim-notify then I don't get the error.
That is very weird, I only ever get number or nil for max_width
.
Can only guess that some nvim-notify setting makes the max_width
a function to be dynamic. Anyway, should be fixed.
If not, please create a new issue with your full tinygit and nvim-notify config to investigate this properly.
Yes it does appear fixed now. Thanks!
Ok, just for reference, Im using LazyVim, which is where that setting is coming from:
Oh I see, thanks!
Bug Description
https://github.com/chrisgrieser/nvim-tinygit/blob/6b133f56d7b61a684db7ae2c9e199f306af4ca8c/lua/tinygit/commands/commit-and-amend.lua#L191-L198
When defining width for preview, if nvim-notify is installed it queries
max_width
attribute so it doesn't overflow. On default configmax_width
is set to nil, and even if set to nil by user, it breaks this function because it can't remove 2 from nil(not sure if was changed recently)https://github.com/rcarriga/nvim-notify/blob/1576123bff3bed67bc673a3076e591abfe5d8ca9/lua/notify/config/init.lua#L20-L44
Relevant Screenshot
No response
To Reproduce
neovim version
Make sure you have done the following