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

wrapped-compact render gives bad argument error #225

Closed
Futarimiti opened this issue Sep 13, 2023 · 2 comments
Closed

wrapped-compact render gives bad argument error #225

Futarimiti opened this issue Sep 13, 2023 · 2 comments

Comments

@Futarimiti
Copy link

Futarimiti commented Sep 13, 2023

Hi, I'm on macOS, using NVIM v0.9.2 on iTerm2.

Minimal reproducible configuration:

local notify = require 'notify'

vim.opt.termguicolors = true

notify.setup { render = 'wrapped-compact' }

vim.notify = notify

After sourcing this configuration, executing :lua vim.notify 'a' gives a bad argument error:

E5108: Error executing lua .../start/nvim-notify/lua/notify/render/wrapped-compact.lua:17: bad argument #1 to 'sub' (number expected, got nil)
stack traceback:
        [C]: in function 'sub'
        .../start/nvim-notify/lua/notify/render/wrapped-compact.lua:17: in function 'split_length'
        .../start/nvim-notify/lua/notify/render/wrapped-compact.lua:28: in function 'custom_wrap'
        .../start/nvim-notify/lua/notify/render/wrapped-compact.lua:49: in function 'render'
        ...ker/start/nvim-notify/lua/notify/service/buffer/init.lua:107: in function 'render'
        ...ack/packer/start/nvim-notify/lua/notify/service/init.lua:53: in function 'push'
        ...te/pack/packer/start/nvim-notify/lua/notify/instance.lua:77: in function 'notify'
        [string ":lua"]:1: in main chunk

All the other built-in renders have not caused any problems so far.

rcarriga pushed a commit that referenced this issue Sep 28, 2023
@rcarriga
Copy link
Owner

Should be fixed in latest commit 😄

@Futarimiti
Copy link
Author

Thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants