Skip to content

[Bug] Unsafe table indexing in load_actions — invalid commands crash Neovim #40

Open

Description

@PyDevC

File: lua/model_cmp/commands.lua:109

Introduction: actions[args[1]][args[2]]() assumes both args[1] and args[2] exist and are valid keys. Any invalid :ModelCmp command crashes with a hard Lua error.

Detailed Description: No input validation exists. :ModelCmp nonexistent, :ModelCmp virtualtext nonexistent, or :ModelCmp (no args) all produce uncatchable errors.

Reproduction:

:ModelCmp nonexistent        " crashes
:ModelCmp virtualtext foo    " crashes
:ModelCmp                    " crashes

System detail: All systems.

Activity

  1. added
    bug
    AI gen
    maintainer triaged
    on May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI genbugmaintainer triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions