Skip to content

wrapped-compact render gives bad argument error #225

@Futarimiti

Description

@Futarimiti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions