diff options
| author | Stefan Novaković <100767853+NStefan002@users.noreply.github.com> | 2026-03-10 00:20:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-09 19:20:25 -0400 |
| commit | bffca6e26bf383bf6360da5827ef1f55f1ac7a67 (patch) | |
| tree | 1c762571a3b2dc0ee0ed24c47857590df76d1678 /runtime/lua/vim/_meta/api.lua | |
| parent | dce8bdd2477284b57f5197023fb7d5d4a1842f67 (diff) | |
feat(extmark): support end_col=-1 if strict=false #28169
Problem:
There is an inconsistency between extmarks/highlights regarding the
`end_col` param.
Solution:
Allow end_col=-1 to mean "end of line" (if strict=false).
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/api.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index e3f99dc539..0ff74f4a2b 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -568,7 +568,7 @@ function vim.api.nvim_buf_line_count(buffer) end --- @param opts vim.api.keyset.set_extmark Optional parameters. --- - id : id of the extmark to edit. --- - end_row : ending line of the mark, 0-based inclusive. ---- - end_col : ending col of the mark, 0-based exclusive. +--- - end_col : ending col of the mark, 0-based exclusive, or -1 to extend the range to end of line. --- - hl_group : highlight group used for the text range. This and below --- highlight groups can be supplied either as a string or as an integer, --- the latter of which can be obtained using `nvim_get_hl_id_by_name()`. |
