tomiis4 / hypersonic.nvim

A Neovim plugin that provides an explanation for regular expressions.
Apache License 2.0
216 stars 3 forks source link

Error: Hypersonic.nvim/lua/hypersonic/utils.lua:105: attempt to get length of a nil value #3

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

When I called the command directly I got the error below. It will be great if there is no error when a user calls it in normal mode.

Error executing Lua callback: .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:45: Vim:Error executing Lua callback: ...share/nvim/lazy/Hypersonic.nvim/lua/hypersonic/utils.lua:105: attempt to get length of a nil value
stack traceback:
    ...share/nvim/lazy/Hypersonic.nvim/lua/hypersonic/utils.lua:105: in function 'get_longest'
    .../share/nvim/lazy/Hypersonic.nvim/lua/hypersonic/init.lua:82: in function 'create_window'
    .../share/nvim/lazy/Hypersonic.nvim/lua/hypersonic/init.lua:141: in function <.../share/nvim/lazy/Hypersonic.nvim/lua/hypersonic/init.lua:138>
    [C]: in function 'cmd'
    .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:45: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:16>
tomiis4 commented 1 year ago

Hi, I never considered this. When I'll get home, I'll fix it. Thanks.

tomiis4 commented 1 year ago

Fixed in: #4