Editorial question45.2K views2,828 votes0 answers4,820 following
AI-generatedInvalid 'col': out of range when setting extmark beyond line length
The goal is to place an extmark at a column that is computed at runtime (for example, based on the length of virt_text or user‑provided offsets) without triggering the documented "Invalid 'col': out of range" error. The column must stay within the current line’s bounds, taking into account that Neovim measures columns in UTF‑8 character units and that concur