Skip to content

bug: error on opening Namu with vim.o.winborder = "bold" #62

@ptdewey

Description

@ptdewey

When opening Namu (with any sub-command other than help or colorscheme) with vim.o.winborder = "bold" set, the following error occurs:

vim.schedule callback: ...vim/site/pack/core/opt/namu.nvim/lua/namu/selecta/ui.lua:226: border chars must be one cell
stack traceback:
        [C]: in function 'nvim_open_win'
        ...vim/site/pack/core/opt/namu.nvim/lua/namu/selecta/ui.lua:226: in function 'create_prompt_window'
        ...vim/site/pack/core/opt/namu.nvim/lua/namu/selecta/ui.lua:1039: in function 'create_windows'
        ...ite/pack/core/opt/namu.nvim/lua/namu/selecta/selecta.lua:566: in function 'pick'
        ...pack/core/opt/namu.nvim/lua/namu/namu_workspace/impl.lua:365: in function 'callback'
        ...te/pack/core/opt/namu.nvim/lua/namu/namu_symbols/lsp.lua:185: in function 'handler'
        ...k.dewey/neovim/share/nvim/runtime/lua/vim/lsp/client.lua:735: in function ''
        vim/_core/editor.lua: in function <vim/_core/editor.lua:0>

Looking at the code, it seems like bold (and possibly other built-in winborder styles) would need to be added to get_prompt_border and get_border_with_footer in ui.lua.

nvim version: v0.12.0-dev-2205+g13a9cdc6b4

I'd be happy to look into this later and make a PR if it would be helpful.

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