neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 64966ba52cea49333da076aff26866730314e259
parent eb7c12d3e347b5dc5eeab7f173a9fc64e074ab06
Author: skewb1k <skewb1kunix@gmail.com>
Date:   Thu, 25 Sep 2025 01:30:54 +0300

fix(highlight): allow ephemeral extmarks past final newline #35888

Fixes #35814

Note: this is a temporary workaround; proper concurrency-safe handling
of highlighting should be investigated.
Diffstat:
Msrc/nvim/api/extmark.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c @@ -813,7 +813,8 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer len = opts->ephemeral ? MAXCOL : ml_get_buf_len(buf, (linenr_T)line2 + 1); } else if (line2 == buf->b_ml.ml_line_count) { // We are trying to add an extmark past final newline - len = 0; + // TODO(skewb1k): workaround for #35814. Investigate proper concurrency-safe handling of extmarks. + len = opts->ephemeral ? MAXCOL : 0; } else { // reuse len from before line2 = (int)line;