Skip to content

[Bug] get_root() hardcodes buffer 0 #42

Open

Description

@PyDevC

File: lua/model_cmp/context.lua:33

Introduction: vim.treesitter.get_parser(0, self.lang, {}) uses 0 (current buffer) instead of self.bufnr. This defeats the purpose of the instance field and will cause incorrect results if the context engine is ever called for a non-current buffer.

Detailed Description: Change 0 to self.bufnr.

Activity

  1. added
    bug
    AI gen
    on May 24, 2026
  2. PyDevC commented on May 26, 2026

    @PyDevC
    OwnerAuthor

    Right now this is very low priority, I added the bufnr variable for features I am going to add in future.
    This is for multi file request features where you can send a request from one and file and switch to other file to work on it.

  3. added
    maintainer triaged
    on May 26, 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